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
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 @@
1 1
 <?xml version="1.0"?>
2
-<ruleset>
3
-	<rule ref="PSR2">
4
-		<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
5
-	</rule>
2
+<ruleset name="Friendica">
3
+    <description>Friendica Coding Standards: PSR2 with tabs instead of spaces</description>
4
+    <arg name="tab-width" value="4"/>
5
+    <rule ref="PSR2">
6
+        <exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
7
+    </rule>
8
+    <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
9
+    <rule ref="Generic.WhiteSpace.ScopeIndent">
10
+        <properties>
11
+            <property name="indent" value="4"/>
12
+            <property name="tabIndent" value="true"/>
13
+        </properties>
14
+    </rule>
6 15
 </ruleset>

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

@@ -1,26 +1,8 @@
1
-<?xml version="1.0"?>
2
-<ruleset name="PEAR-textlanguagedetect">
3
- <rule ref="PEAR">
4
-  <!-- we keep the old php4-style variable names for now -->
5
-  <exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>
6
-  <exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>
7
-  <exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
8
-  <exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"/>
9
-  <exclude name="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"/>
10
-  <exclude name="PEAR.WhiteSpace.ScopeIndent.IncorrectExact"/>
11
-  <exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
12
- </rule>
13
- <description>PSR2 with tabs instead of spaces.</description>
14
- <arg name="tab-width" value="4"/>
15
- <rule ref="PSR2">
16
-     <exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
17
-     <exclude name="Generic.Commenting.DocComment.MissingShort"/>
18
- </rule>
19
- <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
20
- <rule ref="Generic.WhiteSpace.ScopeIndent">
21
-     <properties>
22
-         <property name="indent" value="4"/>
23
-         <property name="tabIndent" value="true"/>
24
-     </properties>
25
- </rule>
26
-</ruleset>
1
+<?xml version="1.0"?>
2
+<ruleset name="PEAR-textlanguagedetect">
3
+ <rule ref="PEAR">
4
+  <!-- we keep the old php4-style variable names for now -->
5
+  <exclude name="PEAR.NamingConventions.ValidFunctionName.PublicUnderscore"/>
6
+  <exclude name="PEAR.NamingConventions.ValidVariableName.PublicUnderscore"/>
7
+ </rule>
8
+</ruleset>

Loading…
Cancel
Save