Legoktm has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/367165 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.MissingReturnType
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment
Change-Id: Icee534f36e94cd20b443a1747727589bc03e7646
---
M backend/CodeRepository.php
M backend/CodeRevision.php
M composer.json
M phpcs.xml
4 files changed, 15 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview
refs/changes/65/367165/1
diff --git a/backend/CodeRepository.php b/backend/CodeRepository.php
index 567c6b7..21e6fb4 100644
--- a/backend/CodeRepository.php
+++ b/backend/CodeRepository.php
@@ -310,7 +310,7 @@
$id = wfMessage( 'code-rev-id', $id )->text();
// If there is more than one repo, use the repo name as well.
- $repos = CodeRepository::getRepoList();
+ $repos = self::getRepoList();
if ( count( $repos ) > 1 ) {
$id = $this->getName() . '.' . $id;
}
diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php
index a65b4c7..ea77c5e 100644
--- a/backend/CodeRevision.php
+++ b/backend/CodeRevision.php
@@ -65,7 +65,7 @@
array_unshift( $rev->paths, $first );
}
- $rev->paths = CodeRevision::getPathFragments(
$rev->paths );
+ $rev->paths = self::getPathFragments( $rev->paths );
}
$rev->commonPath = $common;
@@ -447,7 +447,7 @@
// Update path tracking used for output and searching
if ( $this->paths ) {
- CodeRevision::insertPaths( $dbw, $this->paths,
$this->repoId, $this->id );
+ self::insertPaths( $dbw, $this->paths, $this->repoId,
$this->id );
}
$affectedRevs = $this->getUniqueAffectedRevs();
@@ -499,7 +499,7 @@
$url = $this->getCanonicalUrl();
foreach ( $res as $row ) {
- $revision = CodeRevision::newFromRow(
$this->repo, $row );
+ $revision = self::newFromRow( $this->repo, $row
);
$users = $revision->getCommentingUsers();
$rowUrl = $revision->getCanonicalUrl();
diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
- "mediawiki/mediawiki-codesniffer": "0.10.0"
+ "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index b046d4c..df4c1d0 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,10 +2,18 @@
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
- <exclude
name="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase"/>
+ <exclude
name="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase"
/>
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.MissingReturnType" />
+ <exclude
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+ <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle"
/>
<exclude
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/>
<exclude
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
- <exclude name="MediaWiki.Commenting.FunctionComment"/>
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>
--
To view, visit https://gerrit.wikimedia.org/r/367165
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icee534f36e94cd20b443a1747727589bc03e7646
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits