3
<description>The Squiz coding standard.</description>
5
<!-- Include some specific sniffs -->
6
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
7
<rule ref="Generic.Commenting.Todo"/>
8
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
9
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
10
<rule ref="Generic.Formatting.SpaceAfterCast"/>
11
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
12
<rule ref="Generic.NamingConventions.ConstructorName"/>
13
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
14
<rule ref="Generic.PHP.DeprecatedFunctions"/>
15
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
16
<rule ref="Generic.PHP.LowerCaseKeyword"/>
17
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
18
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
19
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
20
<rule ref="PEAR.ControlStructures.MultiLineCondition"/>
21
<rule ref="PEAR.Files.IncludingFile"/>
22
<rule ref="PEAR.Formatting.MultiLineAssignment"/>
23
<rule ref="Zend.Debug.CodeAnalyzer"/>
25
<!-- Lines can be 85 chars long, but never show errors -->
26
<rule ref="Generic.Files.LineLength">
28
<property name="lineLimit" value="85"/>
29
<property name="absoluteLineLimit" value="0"/>
33
<!-- Use Unix newlines -->
34
<rule ref="Generic.Files.LineEndings">
36
<property name="eolChar" value="\n"/>
40
<!-- Have 8 chars padding maximum and always show as errors -->
41
<rule ref="Generic.Formatting.MultipleStatementAlignment">
43
<property name="maxPadding" value="8"/>
44
<property name="ignoreMultiLine" value="true"/>
45
<property name="error" value="true"/>
49
<!-- Tweaks to metrics -->
50
<rule ref="Generic.Metrics.CyclomaticComplexity">
52
<property name="complexity" value="10"/>
53
<property name="absoluteComplexity" value="100"/>
56
<rule ref="Generic.Metrics.NestingLevel">
58
<property name="nestingLevel" value="5"/>
59
<property name="absoluteNestingLevel" value="50"/>
63
<!-- We don't want gsjlint throwing errors for things we already check -->
64
<rule ref="Generic.Debug.ClosureLinter">
66
<property name="errorCodes" type="array" value="0210"/>
67
<property name="ignoreCodes" type="array" value="0001,0110,0240"/>
70
<rule ref="Generic.Debug.ClosureLinter.ExternalToolError">
71
<message>%2$s</message>
74
<!-- Only one argument per line in multi-line function calls -->
75
<rule ref="PEAR.Functions.FunctionCallSignature">
77
<property name="allowMultipleArguments" value="false"/>