-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
phpcs.xml.dist
112 lines (92 loc) · 4.68 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Coding Standard for PHPCSUtils" xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>Check the code of the PHPCSUtils standard.</description>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-Ruleset
#############################################################################
-->
<file>.</file>
<!-- Exclude PHPDoc structure files. -->
<exclude-pattern>*/build/docs/structure/*</exclude-pattern>
<!-- Exclude Composer vendor directory. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="ps"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!--
#############################################################################
USE THE PHPCSDev RULESET
#############################################################################
-->
<rule ref="PHPCSDev">
<!-- Allow for the file docblock on the line directly following the PHP open tag.
As the sniff in PHPCS does not use modular error codes (yet - see PR #2729),
the complete error code needs to be disabled, not just the bit involving
the file docblocks.
-->
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
</rule>
<!-- Set minimum PHP version supported to PHP 5.4. -->
<config name="testVersion" value="5.4-"/>
<!--
#############################################################################
SNIFF SPECIFIC CONFIGURATION
#############################################################################
-->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="125" />
</properties>
</rule>
<!--
#############################################################################
SELECTIVE EXCLUSIONS
Exclude specific files for specific sniffs and/or exclude sub-groups in sniffs.
#############################################################################
-->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/phpcsutils-autoload\.php$</exclude-pattern>
<exclude-pattern>/PHPCS23Utils/Sniffs/Load/LoadUtilsSniff\.php$</exclude-pattern>
<exclude-pattern>/Tests/bootstrap\.php$</exclude-pattern>
</rule>
<!-- Double arrow alignment gets very fiddly with multi-line test data provider arrays. -->
<rule ref="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned">
<exclude-pattern>/Tests/*Test\.php$</exclude-pattern>
<exclude-pattern>/Tests/*TestCase\.php$</exclude-pattern>
</rule>
<!-- Allow slightly different code style and file docblocks for classes imported from PHPCS. -->
<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.TagsNotGrouped">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
<rule ref="PEAR.Commenting.FileComment.AuthorTagOrder">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
<rule ref="PEAR.Commenting.FileComment.CopyrightTagOrder">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
<rule ref="PEAR.Commenting.FileComment.DuplicateLicenseTag">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
<rule ref="PEAR.Commenting.FileComment.LicenseTagOrder">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
<rule ref="PEAR.Commenting.FileComment.LinkTagOrder">
<exclude-pattern>/PHPCSUtils/BackCompat/BCFile\.php$</exclude-pattern>
<exclude-pattern>/Tests/BackCompat/BCFile/*Test\.php$</exclude-pattern>
</rule>
</ruleset>