-
Notifications
You must be signed in to change notification settings - Fork 90
/
phpcs.xml
45 lines (35 loc) · 2.02 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
<?xml version="1.0"?>
<ruleset name="Gravity Wiz Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<arg name="extensions" value="php,css"/>
<file>.</file>
<!-- Exclude Composer vendor directory. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Exclude NPM modules -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Handled by ESLint -->
<exclude-pattern>*.js</exclude-pattern>
<!-- Run against the PHPCompatibilityWP ruleset -->
<rule ref="PHPCompatibilityWP"/>
<config name="testVersion" value="7.0-"/>
<!-- Turns on the WordPress Standard -->
<rule ref="WordPress-Core">
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<!-- We frequently get form/field IDs back as different types, so sometimes non-strict is needed. -->
<exclude name="WordPress.PHP.StrictComparisons" />
<exclude name="WordPress.PHP.StrictInArray" />
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict" />
<!-- We frequently use extract() to make code more readable. -->
<exclude name="WordPress.PHP.DontExtract.extract_extract" />
<!-- Allow shorthand ternary operators -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
</rule>
</ruleset>