-
Notifications
You must be signed in to change notification settings - Fork 21
/
phpcs.xml.dist
87 lines (66 loc) · 3.15 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
<?xml version="1.0"?>
<ruleset name="PHP-Parallel-Lint">
<description>PHP Parallel Lint coding standard.</description>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->
<!-- Scan all files. -->
<file>.</file>
<!-- Exclude dependencies, test fixtures and auto-generated files. -->
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/tests/fixtures/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php,phpt/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 PHPParallelLint RULESET
#############################################################################
-->
<!-- Set the supported PHP versions for PHPCompatibility (included in PHPParallelLint). -->
<config name="testVersion" value="5.3-"/>
<rule ref="PHPParallelLint">
<!-- For improved readability, a blank line should be allowed before the next leaf in a if/else control structure. -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
<!-- This package includes a polyfill for the JsonSerializable interface. -->
<exclude name="PHPCompatibility.Interfaces.NewInterfaces.jsonserializableFound"/>
</rule>
<rule ref="Generic.PHP.NoSilencedErrors">
<exclude-pattern>/bin/skip-linting\.php$</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="135"/>
<property name="absoluteLineLimit" value="200"/>
</properties>
</rule>
<!--
#############################################################################
SELECTIVE EXCLUSIONS
Exclude specific files for specific sniffs and/or exclude sub-groups in sniffs.
#############################################################################
-->
<!-- Polyfill for PHP native interface, can't be in a namespace. -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>src/polyfill\.php$</exclude-pattern>
</rule>
<!--
#############################################################################
TEMPORARY EXCLUSIONS
These adjustments should be removed once the codebase has been fixed up.
#############################################################################
-->
<!-- To be addressed at a later point in time. -->
<rule ref="Generic.Metrics.CyclomaticComplexity">
<exclude-pattern>/src/(Application|ParallelLint|Settings|Outputs/TextOutput)\.php$</exclude-pattern>
</rule>
</ruleset>