-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathphpcs.xml.dist
106 lines (84 loc) · 4.13 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
<?xml version="1.0"?>
<ruleset name="PaytonsStandard">
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->
<file>./VariableAnalysis</file>
<file>./Tests</file>
<exclude-pattern>./Tests/VariableAnalysisSniff/fixtures/</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="sp"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!-- One tab = 4 spaces. This is needed to properly support tab indentation. -->
<arg name="tab-width" value="4"/>
<!--
#############################################################################
USE THE PHPCSDev, VariableAnalysis RULESETS
#############################################################################
-->
<!-- Set minimum PHP version supported to PHP 5.4. -->
<config name="testVersion" value="5.4-"/>
<rule ref="PHPCSDev">
<!-- This code base uses tab indentation instead of spaces. -->
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- Don't enforce lining up the assignment operators in assignment blocks. -->
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
<!-- Don't enforce lining up the double arrows in array declarations.
Possibly enforce this later once the sniff has been replaced by a better, more configurable version. -->
<exclude name="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned"/>
<!-- Don't enforce documentation (yet). -->
<exclude name="Generic.Commenting.DocComment"/>
<exclude name="PEAR.Commenting.ClassComment"/>
<exclude name="PEAR.Commenting.FileComment"/>
<exclude name="PEAR.Commenting.InlineComment"/>
<!-- WIP: This is part of PSR12 and should probably be enforced,
but the codebase needs work before it can be enabled. -->
<exclude name="Generic.Files.LineLength.TooLong" />
</rule>
<rule ref="VariableAnalysis"/>
<!--
#############################################################################
SNIFF SPECIFIC CONFIGURATION AND SELECTIVELY DEVIATE FROM THE STANDARD
#############################################################################
-->
<!-- Enforce the use of tab indentation instead of spaces. -->
<rule name="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="tabIndent" value="true"/>
</properties>
</rule>
<!-- Disallow a blank line at the start of a class.
This is a minor deviation from PHPCSDev to stay closer to PSR12. -->
<rule ref="PSR12.Classes.OpeningBraceSpace.Found">
<severity>5</severity>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacingBeforeFirst" value="0"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.MemberVarSpacing">
<properties>
<property name="spacingBeforeFirst" value="0"/>
</properties>
</rule>
<!-- While (most of) the documentation sniffs included in PHPCSDev are disabled,
do enforce some basic checking on the tags in function docblocks, like
enforcing columnization of the information in @param tags. -->
<rule ref="PEAR.Commenting.FunctionComment">
<exclude name="PEAR.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="PEAR.Commenting.FunctionComment.InvalidThrows"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn"/>
<exclude name="PEAR.Commenting.FunctionComment.Missing"/>
</rule>
</ruleset>