forked from gravitywiz/snippet-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
44 lines (35 loc) · 1.93 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
<?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="5.6-"/>
<!-- 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" />
</rule>
<!-- Change certain errors to warnings -->
<rule ref="WordPress.PHP.DontExtract.extract_extract">
<type>warning</type>
</rule>
</ruleset>