-
Notifications
You must be signed in to change notification settings - Fork 6
/
phpcs.xml
71 lines (55 loc) · 2.32 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer configuration">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<description>A custom set of code standard rules to check for WordPress Theme based on PRS12</description>
<!--
#############################################################################
CONFIGS
#############################################################################
-->
<!-- PHP version uses at PHPCompatibility -->
<config name="testVersion" value="8.1"/>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->
<!-- Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
-->
<arg value="ps"/>
<!-- Strip the file paths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!-- Only check the PHP files. -->
<arg name="extensions" value="php"/>
<arg name="colors"/>
<!--<arg name="report" value="code"/>-->
<!--<arg name="report" value="summary"/>-->
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Exclude patterns. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/vendor-custom/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>.git/*</exclude-pattern>
<exclude-pattern>.github/*</exclude-pattern>
<!--
#############################################################################
RULES
#############################################################################
-->
<!-- Include the PSR-1 standard -->
<!-- https://www.php-fig.org/psr/psr-1/#23-side-effects Excluding Side Effects in the PHP class file for defined('ABSPATH') || exit; -->
<rule ref="PSR1">
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
</rule>
<!-- Include the whole PSR-12 standard -->
<rule ref="PSR12"/>
<!-- Use PHPCompatibilityWP standard -->
<rule ref="PHPCompatibilityWP"/>
</ruleset>