jenkins-bot has submitted this change and it was merged.

Change subject: Run phpcs through "composer test", disabling failing rules
......................................................................


Run phpcs through "composer test", disabling failing rules

Disabling:
* Generic.Files.LineLength
* Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
* Generic.PHP.ForbiddenFunctions.FoundWithAlternative
* MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix
* MediaWiki.Usage.DirUsage.FunctionFound
* MediaWiki.VariableAnalysis.UnusedGlobalVariables
* MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment
* PSR2.Classes.PropertyDeclaration.ScopeMissing
* PSR2.Classes.PropertyDeclaration.VarUsed
* PSR2.Methods.MethodDeclaration.AbstractAfterVisibility
* PSR2.Methods.MethodDeclaration.StaticBeforeVisibility
* Squiz.Classes.ValidClassName.NotCamelCaps
* Squiz.WhiteSpace.LanguageConstructSpacing.Incorrect

Disabled rules will be enabled individually in follow-up patches.

Bug: T101074
Change-Id: I1d52d891eb8e4f5877d1f1f3fa3aa9fc28dff004
---
M .gitignore
M composer.json
A phpcs.xml
3 files changed, 31 insertions(+), 2 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index c71739d..6690d59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
 node_modules/
 scripts/remotes/
 tests/browser/screenshots
+/vendor
+composer.lock
diff --git a/composer.json b/composer.json
index f2883f7..02ceaea 100644
--- a/composer.json
+++ b/composer.json
@@ -1,10 +1,12 @@
 {
        "require-dev": {
-               "jakub-onderka/php-parallel-lint": "0.9"
+               "jakub-onderka/php-parallel-lint": "0.9",
+               "mediawiki/mediawiki-codesniffer": "0.5.0"
        },
        "scripts": {
                "test": [
-                       "parallel-lint . --exclude vendor"
+                       "parallel-lint . --exclude vendor --exclude 
includes/iterator/CallbackFilterIterator.php",
+                       "phpcs"
                ]
        }
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..d7ede6b
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<ruleset name="MediaWiki">
+       <file>.</file>
+       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude name="Generic.Files.LineLength"/>
+               <exclude 
name="Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma"/>
+               <exclude 
name="Generic.PHP.ForbiddenFunctions.FoundWithAlternative"/>
+               <exclude 
name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
+               <exclude name="MediaWiki.Usage.DirUsage.FunctionFound"/>
+               <exclude 
name="MediaWiki.VariableAnalysis.UnusedGlobalVariables"/>
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment"/>
+               <exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"/>
+               <exclude name="PSR2.Classes.PropertyDeclaration.VarUsed"/>
+               <exclude 
name="PSR2.Methods.MethodDeclaration.AbstractAfterVisibility"/>
+               <exclude 
name="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"/>
+               <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
+               <exclude 
name="Squiz.WhiteSpace.LanguageConstructSpacing.Incorrect"/>
+       </rule>
+       <arg name="encoding" value="utf8"/>
+       <arg name="extensions" value="php,php5,inc"/>
+       <arg name="colors"/>
+       <arg value="p"/>
+       <exclude-pattern>vendor</exclude-pattern>
+</ruleset>

-- 
To view, visit https://gerrit.wikimedia.org/r/215269
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d52d891eb8e4f5877d1f1f3fa3aa9fc28dff004
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to