-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.phpcs.xml.dist
87 lines (69 loc) · 2.64 KB
/
.phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="Advanced Ads">
<description>Advanced Ads Coding Standards.</description>
<!-- PHPCS arguments: -->
<arg value="ps" />
<arg name="colors"/>
<arg name="parallel" value="20" />
<arg name="extensions" value="php"/>
<!-- Set files and paths: -->
<file>.</file>
<!-- Exclude paths -->
<exclude-pattern>*/languages/*</exclude-pattern>
<exclude-pattern>*/lib/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/packages/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/index.php</exclude-pattern>
<!-- PHPCompatibility configs: -->
<config name="testVersion" value="7.2-" />
<config name="minimum_supported_wp_version" value="4.9" />
<config name="minimum_wp_version" value="4.9" />
<rule ref="PHPCompatibility">
<include-pattern>*\.php$</include-pattern>
<exclude-pattern>tests/</exclude-pattern>
</rule>
<!-- Rules: -->
<rule ref="WordPress"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="advanced-ads-genesis" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions">
<exclude name="WordPress.NamingConventions.PrefixAllGlobals" />
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="-"/>
</properties>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
<exclude-pattern>includes/**/interface-*.php</exclude-pattern>
</rule>
<!-- Disable disallow short arrays and enforce them: -->
<rule ref="WordPress-Extra">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Elevate these rules to an error, so it gets printed on commit -->
<rule ref="Generic.Formatting.MultipleStatementAlignment">
<type>error</type>
</rule>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition">
<type>error</type>
</rule>
<rule ref="Universal.Operators.StrictComparisons">
<type>error</type>
</rule>
<rule ref="WordPress.PHP.StrictInArray">
<type>error</type>
</rule>
<!-- Method names MUST NOT be prefixed with a single underscore to indicate protected or private visibility. That is, an underscore prefix explicitly has no meaning. -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<type>error</type>
<message>Method name "%s" must not be prefixed with an underscore to indicate visibility</message>
</rule>
</ruleset>