-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml.dist
92 lines (78 loc) · 3.92 KB
/
phpcs.xml.dist
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
<?xml version="1.0" ?>
<ruleset name="Drgnff WP Coding Standards">
<description>Starting Point Rule Set.</description>
<!-- 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="5.7.0"/>
<!-- @see https://github.com/PHPCompatibility/PHPCompatibility#using-a-custom-ruleset -->
<config name="testVersion" value="7.4-"/>
<!-- What to scan -->
<file>set-the-stage.php</file>
<file>src</file>
<file>tests</file>
<!-- @see https://github.com/PHPCompatibility/PHPCompatibilityWP#how-to-use -->
<rule ref="PHPCompatibilityWP"/>
<!-- @see https://github.com/slevomat/coding-standard -->
<rule ref="SlevomatCodingStandard">
<exclude name="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion"/>
<exclude name="SlevomatCodingStandard.Classes.ForbiddenPublicProperty"/>
<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses"/>
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator"/>
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction"/>
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/>
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/>
<exclude name="SlevomatCodingStandard.Functions.RequireMultiLineCall"/>
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/>
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/>
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment"/>
<exclude name="SlevomatCodingStandard.Files"/>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFullyQualifiedExceptions" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator">
<properties>
<property name="minExpressionsLength" value="40"/>
</properties>
</rule>
<!-- @see https://github.com/Automattic/phpcs-neutron-ruleset -->
<rule ref="NeutronRuleset">
<exclude name="ImportDetection"/>
<exclude name="NeutronStandard.Functions.TypeHint.ExtraSpace"/>
<exclude name="NeutronStandard.Functions.TypeHint.NoReturnType"/>
<exclude name="NeutronStandard.Functions.LongFunction"/>
</rule>
<rule ref="NeutronStandard.Functions.VariableFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="drgnff-wp-stage-switcher"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
<property name="prefixes" type="array" value="drgnff_wp_stage_switcher__,Drgnff\WP\StageSwitcher"/>
</properties>
</rule>
</ruleset>