comparison vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/ruleset.xml @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?xml version="1.0"?>
2 <ruleset name="Squiz">
3 <description>The Squiz coding standard.</description>
4
5 <!-- Include some specific sniffs -->
6 <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
7 <rule ref="Generic.Commenting.Todo"/>
8 <rule ref="Generic.Commenting.DocComment"/>
9 <rule ref="Generic.ControlStructures.InlineControlStructure"/>
10 <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
11 <rule ref="Generic.Formatting.SpaceAfterCast"/>
12 <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
13 <rule ref="Generic.NamingConventions.ConstructorName"/>
14 <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
15 <rule ref="Generic.PHP.DeprecatedFunctions"/>
16 <rule ref="Generic.PHP.DisallowShortOpenTag"/>
17 <rule ref="Generic.PHP.LowerCaseKeyword"/>
18 <rule ref="Generic.PHP.LowerCaseConstant"/>
19 <rule ref="Generic.Strings.UnnecessaryStringConcat"/>
20 <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
21 <rule ref="Generic.WhiteSpace.ScopeIndent"/>
22 <rule ref="PEAR.ControlStructures.MultiLineCondition"/>
23 <rule ref="PEAR.Files.IncludingFile"/>
24 <rule ref="PEAR.Formatting.MultiLineAssignment"/>
25 <rule ref="PEAR.Functions.ValidDefaultValue"/>
26 <rule ref="PSR2.Files.EndFileNewline"/>
27 <rule ref="Zend.Files.ClosingTag"/>
28 <rule ref="Zend.Debug.CodeAnalyzer"/>
29
30 <!-- Lines can be 120 chars long, but never show errors -->
31 <rule ref="Generic.Files.LineLength">
32 <properties>
33 <property name="lineLimit" value="120"/>
34 <property name="absoluteLineLimit" value="0"/>
35 </properties>
36 </rule>
37
38 <!-- Use Unix newlines -->
39 <rule ref="Generic.Files.LineEndings">
40 <properties>
41 <property name="eolChar" value="\n"/>
42 </properties>
43 </rule>
44
45 <!-- Have 20 chars padding maximum and always show as errors -->
46 <rule ref="Generic.Formatting.MultipleStatementAlignment">
47 <properties>
48 <property name="maxPadding" value="20"/>
49 <property name="error" value="true"/>
50 </properties>
51 </rule>
52
53 <!-- We allow empty catch statements -->
54 <rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
55 <severity>0</severity>
56 </rule>
57
58 <!-- We don't want gsjlint throwing errors for things we already check -->
59 <rule ref="Generic.Debug.ClosureLinter">
60 <properties>
61 <property name="errorCodes" type="array" value="0210"/>
62 <property name="ignoreCodes" type="array" value="0001,0110,0240"/>
63 </properties>
64 </rule>
65 <rule ref="Generic.Debug.ClosureLinter.ExternalToolError">
66 <message>%2$s</message>
67 </rule>
68
69 <!-- Only one argument per line in multi-line function calls -->
70 <rule ref="PEAR.Functions.FunctionCallSignature">
71 <properties>
72 <property name="allowMultipleArguments" value="false"/>
73 </properties>
74 </rule>
75
76 </ruleset>