]> git.mxchange.org Git - friendica.git/commitdiff
Improve PHP Code Sniffer ruleset
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 9 Jan 2018 04:37:18 +0000 (23:37 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 9 Jan 2018 04:37:18 +0000 (23:37 -0500)
- Pull Friendica specifics from
vendor/pear/text_languagedetect/phpcs.xml
- Revert changes to vendor/pear/text_languagedetect/phpcs.xml

ruleset.xml
vendor/pear/text_languagedetect/phpcs.xml

index c5f439e58a1657e991d5d2df847479fa5301764f..a71b7062fc02165fa2dcbb9ec9cb3f1e4bde0cae 100644 (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>
index 586ff6d195c0efe8e3f23f1f5d5e85d53496e938..611643b89c606d875abc96d97625e13a44a53daa 100644 (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"?>\r
+<ruleset name="PEAR-textlanguagedetect">\r
+ <rule ref="PEAR">\r
+  <!-- we keep the old php4-style variable names for now -->\r
+  <exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>\r
+  <exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>\r
+ </rule>\r
+</ruleset>\r