-
Notifications
You must be signed in to change notification settings - Fork 11
/
phpcs.xml.dist
90 lines (79 loc) · 3.69 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
<?xml version="1.0"?>
<ruleset name="drupal_coder">
<description>The coding standard for coder_sniffer.</description>
<file>coder_sniffer</file>
<exclude-pattern>*/Test/*</exclude-pattern>
<!-- The following comes from the 2.9 PHPCS ruleset.xml { -->
<!-- Include the whole PEAR standard -->
<rule ref="PEAR"/>
<!-- Include some sniffs from other standards that don't conflict with PEAR -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<rule ref="Squiz.Arrays.ArrayDeclaration" />
<rule ref="Squiz.Commenting.ClosingDeclarationComment" />
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
<rule ref="Squiz.Commenting.BlockComment" />
<rule ref="Squiz.Commenting.DocCommentAlignment" />
<rule ref="Squiz.Commenting.EmptyCatchComment" />
<rule ref="Squiz.Commenting.InlineComment" />
<rule ref="Squiz.Commenting.LongConditionClosingComment" />
<rule ref="Squiz.Commenting.PostStatementComment" />
<rule ref="Squiz.Formatting.OperatorBracket" />
<rule ref="Squiz.Operators.ComparisonOperatorUsage" />
<rule ref="Squiz.PHP.DisallowInlineIf" />
<rule ref="Squiz.Strings.ConcatenationSpacing" />
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace" />
<rule ref="Squiz.WhiteSpace.FunctionSpacing" />
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="PSR2.Files.EndFileNewline"/>
<rule ref="Zend.Files.ClosingTag"/>
<!-- Only one argument per line in multi-line function calls -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="false"/>
</properties>
</rule>
<!-- Have 12 chars padding maximum and always show as errors -->
<rule ref="Generic.Formatting.MultipleStatementAlignment">
<properties>
<property name="maxPadding" value="12"/>
<property name="error" value="true"/>
</properties>
</rule>
<!-- } End of original PHPCS ruleset.xml -->
<!-- The following sniffs are disabled because we don't want them -->
<rule ref="PEAR.Commenting.FileComment">
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLicenseTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
</rule>
<rule ref="PEAR.Commenting.ClassComment">
<exclude name="PEAR.Commenting.ClassComment.CategoryTagOrder"/>
<exclude name="PEAR.Commenting.ClassComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingLicenseTag"/>
</rule>
<rule ref="PEAR.NamingConventions.ValidFunctionName">
<exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"/>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>
<rule ref="Generic.Commenting.Todo">
<exclude name="Generic.Commenting.Todo.TaskFound"/>
<exclude name="Generic.Commenting.Todo.CommentFound"/>
</rule>
<!-- The following sniffs are disabled because Coder is not compliant yet, see
https://www.drupal.org/node/2734539 -->
<rule ref="PEAR.Commenting.FunctionComment.MissingParamComment">
<exclude-pattern>*/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php</exclude-pattern>
</rule>
</ruleset>