~ubuntu-branches/ubuntu/wily/php-codesniffer/wily

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.0RC2/CodeSniffer/Standards/Squiz/ruleset.xml

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140721144241-g4orlcuk4jzn9mhs
Tags: 1.5.3-1
* Team upload
* Focus on stable release
* Update copyright
* Bump standards version to 3.9.5
* Update Homepage
* Use ${phppear:…} instead of hardcoding them
* Run tests in dh_auto_test
* Update patch with gbp pq
* Simplify configuration installation
* Edit package.xml to move script
* Add DEP-8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.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"/>
24
 
 
25
 
 <!-- Lines can be 85 chars long, but never show errors -->
26
 
 <rule ref="Generic.Files.LineLength">
27
 
  <properties>
28
 
   <property name="lineLimit" value="85"/>
29
 
   <property name="absoluteLineLimit" value="0"/>
30
 
  </properties>
31
 
 </rule>
32
 
 
33
 
 <!-- Use Unix newlines -->
34
 
 <rule ref="Generic.Files.LineEndings">
35
 
  <properties>
36
 
   <property name="eolChar" value="\n"/>
37
 
  </properties>
38
 
 </rule>
39
 
 
40
 
 <!-- Have 8 chars padding maximum and always show as errors -->
41
 
 <rule ref="Generic.Formatting.MultipleStatementAlignment">
42
 
  <properties>
43
 
   <property name="maxPadding" value="8"/>
44
 
   <property name="ignoreMultiLine" value="true"/>
45
 
   <property name="error" value="true"/>
46
 
  </properties>
47
 
 </rule>
48
 
 
49
 
 <!-- Tweaks to metrics -->
50
 
 <rule ref="Generic.Metrics.CyclomaticComplexity">
51
 
  <properties>
52
 
   <property name="complexity" value="10"/>
53
 
   <property name="absoluteComplexity" value="100"/>
54
 
  </properties>
55
 
 </rule>
56
 
 <rule ref="Generic.Metrics.NestingLevel">
57
 
  <properties>
58
 
   <property name="nestingLevel" value="5"/>
59
 
   <property name="absoluteNestingLevel" value="50"/>
60
 
  </properties>
61
 
 </rule>
62
 
 
63
 
 <!-- We don't want gsjlint throwing errors for things we already check -->
64
 
 <rule ref="Generic.Debug.ClosureLinter">
65
 
  <properties>
66
 
   <property name="errorCodes" type="array" value="0210"/>
67
 
   <property name="ignoreCodes" type="array" value="0001,0110,0240"/>
68
 
  </properties>
69
 
 </rule>
70
 
 <rule ref="Generic.Debug.ClosureLinter.ExternalToolError">
71
 
  <message>%2$s</message>
72
 
 </rule>
73
 
 
74
 
 <!-- Only one argument per line in multi-line function calls -->
75
 
 <rule ref="PEAR.Functions.FunctionCallSignature">
76
 
  <properties>
77
 
   <property name="allowMultipleArguments" value="false"/>
78
 
  </properties>
79
 
 </rule>
80
 
 
81
 
</ruleset>