-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
62 lines (50 loc) · 2.09 KB
/
phpcs.xml
File metadata and controls
62 lines (50 loc) · 2.09 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
<?xml version="1.0"?>
<ruleset name="SilverAssist Settings Hub Standards">
<description>WordPress Coding Standards for SilverAssist Settings Hub</description>
<!-- What to scan -->
<file>.</file>
<!-- Exclude paths -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/coverage/*</exclude-pattern>
<exclude-pattern>*/.phpunit.cache/*</exclude-pattern>
<exclude-pattern>*/integration-guide.php</exclude-pattern>
<!-- Show progress and colors -->
<arg value="ps"/>
<arg name="colors"/>
<!-- Check code for cross-version PHP compatibility -->
<config name="testVersion" value="8.2-"/>
<!-- Include WordPress-Extra standard -->
<rule ref="WordPress-Extra">
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<!-- PSR-4 PascalCase filenames, not WordPress hyphenated lowercase -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<!-- Allow opening braces on same line (K&R style) -->
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<exclude name="Generic.Classes.OpeningBraceSameLine"/>
</rule>
<!-- Allow short array syntax explicitly -->
<rule ref="Universal.Arrays.DisallowShortArraySyntax">
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found"/>
</rule>
<!-- Enforce WordPress naming conventions -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="silverassist_settings_hub"/>
<element value="SilverAssist\SettingsHub"/>
</property>
</properties>
</rule>
<!-- Enforce WordPress documentation standards -->
<rule ref="WordPress-Docs"/>
<!-- Extra rules -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<!-- Minimum WordPress version -->
<config name="minimum_supported_wp_version" value="6.5"/>
</ruleset>