-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
130 lines (118 loc) · 5.76 KB
/
Copy pathphpcs.xml
File metadata and controls
130 lines (118 loc) · 5.76 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0"?>
<ruleset name="DoW Coding Style">
<file>.</file>
<exclude-pattern>__mocks__/*</exclude-pattern>
<exclude-pattern>.github/*</exclude-pattern>
<exclude-pattern>.yarn/*</exclude-pattern>
<exclude-pattern>*.blade.php</exclude-pattern>
<exclude-pattern>assets/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<exclude-pattern>cache/*</exclude-pattern>
<exclude-pattern>dependencies/*</exclude-pattern>
<exclude-pattern>dist/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>stubs/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<arg value="sp"/>
<arg name="basepath" value="./"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/>
<config name="testVersion" value="8.2-"/>
<config name="minimum_supported_wp_version" value="6.8"/>
<rule ref="PSR12NeutronRuleset">
<!-- NeutronStandard bug -->
<exclude name="NeutronStandard.Functions.TypeHint.NoReturnType"/>
<!-- https://github.com/sirbrillig/phpcs-import-detection/issues/45 -->
<exclude name="Generic.Formatting.NoSpaceAfterCast"/>
<exclude name="Generic.Functions.CallTimePassByReference"/>
<exclude name="Generic.PHP.ForbiddenFunctions.Found" />
<exclude name="ImportDetection.Imports.RequireImports"/>
<exclude name="NeutronStandard.Functions.LongFunction.LongFunction"/>
<exclude name="PEAR.Commenting.FileComment.InvalidPackage"/>
<exclude name="PEAR.Commenting.FileComment.Missing"/>
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLicenseTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
<exclude name="PSR12NeutronRuleset.NamingConventions.MeaningfulVariableName.NotMeaningfulVariableName" />
<exclude name="PSR12NeutronRuleset.Strings.ConcatenationUsage.NotAllowed" />
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator.DisallowedShortTernaryOperator" />
<exclude name="SlevomatCodingStandard.Functions.DisallowArrowFunction.DisallowedArrowFunction" />
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength" />
<exclude name="SlevomatCodingStandard.Namespaces.DisallowGroupUse.DisallowedGroupUse" />
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException" />
<exclude name="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine.MultipleUsesPerLine" />
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.classFound" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.echoFound" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.parentFound" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.resourceFound"/>
<exclude name="VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable" />
<exclude name="WordPress.Arrays.CommaAfterArrayItem.NoComma"/>
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
</rule>
<rule ref="Generic.Formatting.SpaceAfterCast">
<properties>
<property name="spacing" value="0" />
</properties>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>/src/views</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="dowst"/>
<element value="DoWStarterTheme"/>
</property>
</properties>
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound" />
<exclude-pattern>/src/views</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>/src/views</exclude-pattern>
</rule>
<!-- Check for correct text domain on all translatable strings. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="dow-starter-theme"/>
</property>
</properties>
</rule>
<rule ref="PEAR.Commenting.FunctionComment"/>
<rule ref="Squiz.PHP.DiscouragedFunctions">
<properties>
<!--
* ini_set() environment belongs to the server
* env() does not work in production (artisan config:cache)
* eval() is dangerous!
* print and print_r() disturb templating, see wilderborn/partyline
* dump(), dd(), var_dump() - consider using barryvdh/laravel-debugbar
* error_log() has special use
* define() is for global constants
Defaults: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php
See https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php
-->
<property name="forbiddenFunctions" type="array">
<element key="ini_set" value="null"/>
<element key="env" value="null"/>
<element key="list" value="null"/>
<element key="extract" value="null"/>
<element key="eval" value="null"/>
<element key="print" value="null"/>
<element key="print_r" value="null"/>
<element key="dump" value="null"/>
<element key="dd" value="null"/>
<element key="var_dump" value="null"/>
<element key="error_log" value="null"/>
<element key="define" value="null"/>
</property>
</properties>
</rule>
</ruleset>