-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpcs.xml
102 lines (88 loc) · 3.91 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
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0"?>
<ruleset name="PHPCS Coding Standards">
<description>PHPCS dev PHP_CodeSniffer ruleset.</description>
<file>.</file>
<!-- Exclude paths -->
<exclude-pattern>.js</exclude-pattern>
<exclude-pattern>.css</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/languages/*</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="ps" />
<!-- Strip the file paths in reports down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check up to 8 files simultaneously. -->
<!--<arg name="parallel" value="4" />-->
<!-- Configs -->
<config name="minimum_supported_wp_version" value="4.7" /> <!-- Minimum WP Version -->
<config name="testVersion" value="7.0" /> <!-- Minimum PHP Version -->
<config name="text_domain" value="wp-last-modified-info"/>
<!-- Rules -->
<rule ref="Squiz">
<exclude name="Squiz"/>
<exclude-pattern>index.php</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/>
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
<exclude name="WordPress.DB.SlowDBQuery"/>
<exclude name="WordPress.DB.DirectDatabaseQuery"/>
<exclude name="WordPress.NamingConventions"/>
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
<exclude name="WordPress.DateTime.CurrentTimeTimestamp.Requested"/>
<exclude name="Universal.Operators.StrictComparisons.LooseEqual"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="WordPress-Core" />
<rule ref="WordPress-Extra" />
<!--<rule ref="WordPress-VIP-Go" /> -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-last-modified-info" />
</properties>
</rule>
<!--<rule ref="PHPCompatibility">-->
<!--<exclude-pattern>tests/</exclude-pattern>-->
<!--<!– Marked some internal method with DoubleUnderscore before method name –>-->
<!--<exclude name="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore"/>-->
<!--</rule>-->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>inc/**/abstract-*.php</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>src/*</exclude-pattern>
</rule>
<rule ref="PEAR">
<exclude-pattern>.</exclude-pattern>
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid"/>
<exclude name="PEAR.Commenting.FileComment"/>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
<exclude-pattern>tests/e2e-tests/</exclude-pattern>
</rule>
<rule ref="Generic.Commenting">
<exclude-pattern>tests/</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>languages/</exclude-pattern>
<exclude-pattern>i18n/</exclude-pattern>
<exclude-pattern>src/</exclude-pattern>
</rule>
<rule ref="Generic">
<exclude-pattern>.</exclude-pattern>
<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent.NonIndentTabsUsed" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
<exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="Generic.Arrays.DisallowLongArraySyntax" />
</rule>
</ruleset>