aboutsummaryrefslogtreecommitdiffstats
path: root/build/phpcs.xml
blob: d2909955ed2712adf8e133162f68d4f516846dbe (plain)
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
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
 <description>The coding standard for PHP_CodeSniffer itself.</description>
 <exclude-pattern>*/Tests/*</exclude-pattern>
 <exclude-pattern>*/lib/MDB2/*</exclude-pattern>
 <exclude-pattern>*/3rdparty/*</exclude-pattern>
 <exclude-pattern>*.min.*</exclude-pattern>
 <exclude-pattern>*/l10n/*</exclude-pattern>
 <exclude-pattern>*/files_texteditor/js/aceeditor/*</exclude-pattern>
 <exclude-pattern>*/files_pdfviewer/js/pdfjs/*</exclude-pattern>
 <exclude-pattern>*/files_odfviewer/src/*</exclude-pattern>
 <exclude-pattern>*/files_svgedit/svg-edit/*</exclude-pattern>
 <exclude-pattern>*jquery-ui-*.css</exclude-pattern>
 <extensions>php</extensions>

 <!-- Include the whole PEAR standard -->
 <rule ref="PEAR">
  <exclude name="PEAR.Commenting.FileComment.InvalidAuthors" />
  <exclude name="PEAR.Commenting.FileComment.TagIndent" />
  <exclude name="PEAR.Commenting.FileComment.MissingVersion" />
  <exclude name="PEAR.Commenting.FileComment.MissingTag" />
  <exclude name="PEAR.Commenting.ClassComment.TagIndent" />
  <!-- exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect" /-->
  <exclude name="PEAR.Commenting.ClassComment.WrongTagOrder" />
  <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
  <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" />
  <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
  <exclude name="Generic.ControlStructures.InlineControlStructure.Discouraged" />
  <exclude name="PEAR.Commenting.FunctionComment.ParameterCommentsNotAligned" />
  <exclude name="PEAR.Commenting.FunctionComment.MissingParamTag" />
  <exclude name="PEAR.ControlStructures.ControlSignature" />

  <!-- ident and alignment stuff  -->
  <!-- exclude name="PEAR.ControlStructures.MultiLineCondition.Alignment" />
  <exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" / -->

  <!-- allow curly on classes and functions -->
  <exclude name="PEAR.Functions.FunctionDeclaration.BraceOnSameLine" />
  <exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine" />

  <exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore" />
  <exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
  <exclude name="PEAR.WhiteSpace.ScopeIndent"/>
 </rule>

 <rule ref="Zend.Files.ClosingTag" />

 <rule ref="Generic.WhiteSpace.ScopeIndent">
   <properties>
     <property name="indent" value="4"/>
   </properties>
 </rule>

 <rule ref="Generic.Files.LineLength">
  <properties>
   <property name="lineLimit" value="120"/>
   <property name="absoluteLineLimit" value="160"/>
  </properties>
 </rule>

 <!-- Include most of the Squiz standard -->
 <!-- rule ref="Squiz">
  <exclude name="Squiz.Classes.ClassFileName"/>
  <exclude name="Squiz.Classes.ValidClassName"/>
  <exclude name="Squiz.Commenting.ClassComment"/>
  <exclude name="Squiz.Commenting.FileComment"/>
  <exclude name="Squiz.Commenting.FunctionComment"/>
  <exclude name="Squiz.Commenting.VariableComment"/>
  <exclude name="Squiz.ControlStructures.SwitchDeclaration"/>
  <exclude name="Squiz.Files.FileExtension"/>
  <exclude name="Squiz.NamingConventions.ConstantCase"/>
  <exclude name="Squiz.Operators.ComparisonOperatorUsage"/>
</rule -->

 <!-- We allow variables to be used inside double quoted strings -->
 <!-- rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
  <severity>0</severity>
 </rule -->

</ruleset>