annotate vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/ruleset.xml @ 7:848c88cfe644

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