-
Notifications
You must be signed in to change notification settings - Fork 4
/
phpcs.xml
76 lines (68 loc) · 3.73 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
<description>A modified set of rules, based on the WordPress Coding Standards.</description>
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs,vendor/phpcompatibility/php-compatibility"/>
<!-- What to scan -->
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
<config name="minimum_supported_wp_version" value="4.6"/>
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibility"/>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.PHP.StrictComparisons"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
<exclude name="Generic.Commenting.DocComment.SpacingAfter"/>
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma"/>
<exclude name="PEAR.Functions.FunctionCallSignature"/>
<exclude name="Squiz.Commenting"/>
<exclude name="Squiz.PHP.DisallowSizeFunctionsInLoops.Found"/>
<exclude name="Squiz.WhiteSpace"/>
<exclude name="WordPress.Arrays"/>
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.NamingConventions"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash"/>
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText"/>
<exclude name="WordPress.WhiteSpace"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="amapress"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="amapress"/>
</property>
</properties>
</rule>
</ruleset>