-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
89 lines (83 loc) · 3.58 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0"?>
<ruleset name="WPML">
<description>WPML Coding Standards</description>
<!-- What to scan -->
<file>.</file>
<exclude-pattern>*/\.git/*</exclude-pattern>
<exclude-pattern>*/\.githooks/*</exclude-pattern>
<exclude-pattern>*/\.make/*</exclude-pattern>
<exclude-pattern>*/dist/*</exclude-pattern>
<exclude-pattern>*/locale/*</exclude-pattern>
<exclude-pattern>*/lib/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/res/*</exclude-pattern>
<exclude-pattern>*/src/*</exclude-pattern>
<exclude-pattern>*/templates/*</exclude-pattern>
<exclude-pattern>*/tests/wordpress/*</exclude-pattern>
<exclude-pattern>*/tests/wordpress-develop/*</exclude-pattern>
<exclude-pattern>*/tests/wordpress-tests-lib/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*\.js</exclude-pattern>
<exclude-pattern>*\.mo</exclude-pattern>
<exclude-pattern>*\.po</exclude-pattern>
<exclude-pattern>*\.twig</exclude-pattern>
<exclude-pattern>*\.css</exclude-pattern>
<exclude-pattern>*\.scss</exclude-pattern>
<!-- How to scan -->
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="extensions" value="php"/>
<arg name="parallel" value="12"/><!-- Enables parallel processing when available for faster results. -->
<config name="testVersion" value="5.6-"/>
<!-- Rules: Check PHP version compatibility-->
<!-- <rule ref="PHPCompatibility"/>-->
<!-- <rule ref="PHPCompatibilityWP"/>-->
<!-- Rules: WordPress Coding Standards-->
<config name="minimum_supported_wp_version" value="4.4"/>
<rule ref="WordPress"/>
<rule ref="Squiz.Commenting.FileComment.Missing">
<severity>0</severity>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<severity>0</severity>
</rule>
<rule ref="WordPress.WhiteSpace.PrecisionAlignment.Found">
<!-- This sniff can't tell from intentional and unintentional indentation and this makes it fairly annoying -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1304 -->
<severity>0</severity>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<severity>0</severity>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<severity>0</severity>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamComment">
<severity>0</severity>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<severity>0</severity>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase">
<severity>0</severity>
</rule>
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<severity>0</severity>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<rule ref="WordPress.PHP.DisallowShortTernary.Found">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase">
<severity>0</severity>
</rule>
</ruleset>