-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
78 lines (66 loc) · 2.7 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
78 lines (66 loc) · 2.7 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="SPARXSTAR Sky - Default Ruleset"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
<description>
Default strict coding standards for SPARXSTAR Sky.
Enforces WordPress VIP, PHP compatibility, modern PHP usage, naming conventions, and documentation.
This file is intended as the baseline for CI and contributors.
To override locally, create a `phpcs.xml` file (gitignored).
</description>
<!-- Scan plugin source -->
<file>.</file>
<include-pattern>src/*</include-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<!-- PHPCS runtime args -->
<arg value="sp"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/>
<arg name="basepath" value="./"/>
<!-- Installed standards -->
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs,vendor/automattic/vipwpcs,vendor/phpcompatibility/php-compatibility,vendor/phpcompatibility/phpcompatibility-wp,vendor/phpcompatibility/phpcompatibility-paragonie,vendor/phpcsstandards/phpcsextra,vendor/phpcsstandards/phpcsutils,vendor/sirbrillig/phpcs-variable-analysis"/>
<!-- Target PHP version -->
<config name="testVersion" value="8.2-"/>
<!-- Core standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPressVIPMinimum"/>
<!-- Modernization and compatibility -->
<rule ref="PHPCompatibility"/>
<rule ref="PHPCompatibilityWP"/>
<rule ref="PHPCompatibilityParagonieRandomCompat"/>
<rule ref="PHPCompatibilityParagonieSodiumCompat"/>
<rule ref="Modernize"/>
<rule ref="Universal"/>
<rule ref="VariableAnalysis"/>
<!-- Naming conventions -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="sparxstar"/>
<element value="star"/>
</property>
</properties>
</rule>
<!-- Text domain enforcement -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="sparxstar"/>
</property>
</properties>
</rule>
<!-- Exclude some overly strict rules for modern PHP -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<!-- Allow short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
</ruleset>