mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
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
This commit is contained in:
parent
e174fdf91b
commit
cb82edfe94
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,3 +5,5 @@
|
|||
node_modules/
|
||||
scripts/remotes/
|
||||
tests/browser/screenshots
|
||||
/vendor
|
||||
composer.lock
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
25
phpcs.xml
Normal file
25
phpcs.xml
Normal file
|
@ -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>
|
Loading…
Reference in a new issue