Browse Source

Improve PHP Code Sniffer ruleset

- Pull Friendica specifics from
vendor/pear/text_languagedetect/phpcs.xml
- Revert changes to vendor/pear/text_languagedetect/phpcs.xml
tags/3.6
Hypolite Petovan 1 year ago
parent
commit
143a0e3bc6
2 changed files with 21 additions and 30 deletions
  1. 13
    4
      ruleset.xml
  2. 8
    26
      vendor/pear/text_languagedetect/phpcs.xml

+ 13
- 4
ruleset.xml View File

@@ -1,6 +1,15 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<ruleset name="Friendica">
<description>Friendica Coding Standards: PSR2 with tabs instead of spaces</description>
<arg name="tab-width" value="4"/>
<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>

+ 8
- 26
vendor/pear/text_languagedetect/phpcs.xml View File

@@ -1,26 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PEAR-textlanguagedetect">
<rule ref="PEAR">
<!-- we keep the old php4-style variable names for now -->
<exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"/>
<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>
<?xml version="1.0"?>
<ruleset name="PEAR-textlanguagedetect">
<rule ref="PEAR">
<!-- we keep the old php4-style variable names for now -->
<exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>
<exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>
</rule>
</ruleset>

Loading…
Cancel
Save