forked from wp-graphql/wp-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
57 lines (46 loc) · 2.07 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
<?xml version="1.0"?>
<ruleset name="WP">
<description>Coding standards for the WPGraphQL plugin</description>
<config name="ignore_errors_on_exit" value="0" />
<config name="ignore_warnings_on_exit" value="0" />
<arg name="colors" />
<arg value="p" />
<arg name="extensions" value="php"/>
<!-- Run the lints in parallel so they run faster. This will separate the files into 20 chunks to be linted -->
<arg name="parallel" value="20"/>
<!-- Includes -->
<file>./access-functions.php</file>
<file>./wp-graphql.php</file>
<file>./src</file>
<!-- Rules -->
<rule ref="WordPress-Core">
<!-- Definitely should not be added back -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.Found"/>
<!-- Should probably not be added back -->
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.objectFound"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure"/>
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date"/>
<!-- Should maybe Add Back Later -->
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
<exclude name="WordPress.NamingConventions.ValidVariableName" />
</rule>
<!-- Tests for inline documentation of code -->
<rule ref="WordPress-Docs">
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="WordPress.Files.FileName" />
<!-- Should be re-enabled -->
<exclude name="Squiz.Commenting"/>
</rule>
<!-- Tests for PHP version compatibility -->
<rule ref="PHPCompatibilityWP">
<config name="testVersion" value="7.0-"/>
</rule>
<!-- Enforce short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
</ruleset>