-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
72 lines (62 loc) · 2.71 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
72 lines (62 loc) · 2.71 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
<?xml version="1.0"?>
<ruleset name="LW Firewall Coding Standards">
<description>PHP CodeSniffer ruleset for LW Firewall plugin.</description>
<!-- Scan these files -->
<file>.</file>
<!-- Exclude paths -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<!-- Standalone CLI test harness, not shipped plugin runtime code -->
<exclude-pattern>/tests/*</exclude-pattern>
<!-- Show progress -->
<arg value="ps"/>
<arg name="colors"/>
<!-- Use WordPress Coding Standards -->
<rule ref="WordPress">
<!-- Allow short array syntax -->
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<!-- Allow reserved keyword parameter names -->
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames"/>
<!-- Allow code-like comments -->
<exclude name="Squiz.PHP.CommentedOutCode"/>
<!-- @phpstan-ignore directive comments end in an identifier, not punctuation -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<!-- PSR-4 autoloading: use PascalCase filenames instead of class- prefix -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
</rule>
<!-- WP-CLI requires $args/$assoc_args in method signatures -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude-pattern>/includes/CLI/*</exclude-pattern>
</rule>
<!-- FileStorage needs direct filesystem ops and error silencing -->
<rule ref="WordPress.PHP.NoSilencedErrors">
<exclude-pattern>/includes/Storage/FileStorage.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_is_writable">
<exclude-pattern>/includes/Storage/FileStorage.php</exclude-pattern>
</rule>
<!-- PHP Compatibility -->
<rule ref="PHPCompatibilityWP"/>
<config name="testVersion" value="8.2-"/>
<!-- WordPress minimum version -->
<config name="minimum_wp_version" value="6.0"/>
<!-- Text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="lw-firewall"/>
</property>
</properties>
</rule>
<!-- Prefixes -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="lw_firewall"/>
<element value="lw_plugins"/>
<element value="LightweightPlugins\Firewall"/>
</property>
</properties>
</rule>
</ruleset>