Merge pull request #4190 from MrPetovan/task/2103-improve-phpcs-ruleset

Improve PHP Code Sniffer ruleset
This commit is contained in:
Tobias Diekershoff 2018-01-09 06:42:55 +01:00 committed by GitHub
commit c3cfbbc461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 30 deletions

View File

@ -1,6 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset> <ruleset name="Friendica">
<rule ref="PSR2"> <description>Friendica Coding Standards: PSR2 with tabs instead of spaces</description>
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/> <arg name="tab-width" value="4"/>
</rule> <rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
</ruleset> </ruleset>

View File

@ -1,26 +1,8 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset name="PEAR-textlanguagedetect"> <ruleset name="PEAR-textlanguagedetect">
<rule ref="PEAR"> <rule ref="PEAR">
<!-- we keep the old php4-style variable names for now --> <!-- we keep the old php4-style variable names for now -->
<exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/> <exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/> <exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"/> </rule>
<exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"/> </ruleset>
<exclude name="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"/>
<exclude name="PEAR.WhiteSpace.ScopeIndent.IncorrectExact"/>
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
</rule>
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
</ruleset>