-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathphpcs.xml
More file actions
60 lines (54 loc) · 2.41 KB
/
Copy pathphpcs.xml
File metadata and controls
60 lines (54 loc) · 2.41 KB
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
<?xml version="1.0"?>
<ruleset name="CustomStandard">
<description>Custom coding standard.</description>
<!-- Without this phpcs walks .js/.css/.html too -->
<arg name="extensions" value="php"/>
<arg name="cache" value=".phpcs.cache"/>
<arg name="colors"/>
<!-- n: warnings do not fail the run; code_tests.bash decides what is fatal -->
<arg value="n"/>
<config name="ignore_warnings_on_exit" value="1"/>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/Cache/*</exclude-pattern>
<exclude-pattern>*/assets/dist/*</exclude-pattern>
<!-- <rule ref="PEAR">
<exclude name="PEAR.Commenting.FileComment.Missing"/>
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
<exclude name="PEAR.Commenting.ClassComment"/>
<exclude name="PEAR.Commenting.InlineComment"/>
</rule> -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<!--
PSR-12 supersedes PSR-2. Including both meant PSR-2's older ControlSignature sniff
rejected multi-line if() conditions - the style PSR-12 explicitly allows and this
codebase uses throughout - so 14 of the 17 reported errors were the ruleset
disagreeing with itself.
-->
<rule ref="PSR12"/>
<!--
i18n is an established abbreviation, and renaming the class would break every
application that references it.
-->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>*/i18n.php</exclude-pattern>
</rule>
<!-- phpcs 4 renamed this code from NotCamelCaps -->
<rule ref="Squiz.Classes.ValidClassName.NotPascalCase">
<exclude-pattern>*/i18n.php</exclude-pattern>
</rule>
<rule ref="Zend.Files.ClosingTag"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
</ruleset>