forked from drevops/vortex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
110 lines (95 loc) Β· 4.56 KB
/
phpcs.xml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0"?>
<ruleset name="your_site">
<description>PHPCS Standard for YOURSITE website, based on Drupal standards.</description>
<rule ref="Drupal"/>
<rule ref="DrupalPractice"/>
<rule ref="Generic.Debug.ESLint"/>
<rule ref="PHPCompatibility"/>
<arg name="extensions" value="inc,info,install,module,php,profile,test,theme"/>
<arg name="colors"/>
<arg value="sp"/>
<arg name="parallel" value="75"/>
<!--Lint code against platform version specified in composer.json
key "config.platform.php".-->
<config name="testVersion" value="7.3"/>
<!-- Exclude theme assets. -->
<exclude-pattern>docroot\/themes\/custom\/.*\/build\/.*</exclude-pattern>
<exclude-pattern>docroot\/themes\/custom\/.*\/fonts\/.*</exclude-pattern>
<exclude-pattern>docroot\/themes\/custom\/.*\/images\/.*</exclude-pattern>
<exclude-pattern>docroot\/themes\/custom\/.*\/node_modules\/.*</exclude-pattern>
<exclude-pattern>*\.min\.*</exclude-pattern>
<!-- Exclude CircleCI config files. -->
<exclude-pattern>circle\.yml</exclude-pattern>
<exclude-pattern>\.circle\/config\.yml</exclude-pattern>
<!--Force short array syntax.-->
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>warning</type>
</rule>
<!--Allow global variables in settings file.-->
<rule ref="DrupalPractice.CodeAnalysis.VariableAnalysis.UndefinedVariable">
<exclude-pattern>settings\.php</exclude-pattern>
</rule>
<rule ref="DrupalPractice.Variables.GetRequestData.SuperglobalAccessedWithVar">
<exclude-pattern>settings\.php</exclude-pattern>
</rule>
<!--Allow section separators in files.-->
<rule ref="DrupalPractice.Commenting.CommentEmptyLine.SpacingAfter">
<exclude-pattern>settings\.php</exclude-pattern>
<exclude-pattern>\.install</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.InlineComment.InvalidEndChar">
<exclude-pattern>settings\.php</exclude-pattern>
<exclude-pattern>\.install</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.InlineComment.NoSpaceBefore">
<exclude-pattern>settings\.php</exclude-pattern>
<exclude-pattern>\.install</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.InlineComment.SpacingAfter">
<exclude-pattern>settings\.php</exclude-pattern>
<exclude-pattern>\.install</exclude-pattern>
</rule>
<!--Allow arrays with and without specified keys in install files.-->
<rule ref="Squiz.Arrays.ArrayDeclaration.KeySpecified">
<exclude-pattern>*\.install</exclude-pattern>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.NoKeySpecified">
<exclude-pattern>*\.install</exclude-pattern>
</rule>
<!--Allow version in custom modules.-->
<rule ref="Drupal.InfoFiles.AutoAddedKeys.Version">
<exclude-pattern>custom/*\.info\.yml</exclude-pattern>
</rule>
<!--Do not re quire dependencies namespace in profiles.-->
<rule ref="DrupalPractice.InfoFiles.NamespacedDependency.NonNamespaced">
<exclude-pattern>profiles\/*/*\.info\.yml</exclude-pattern>
</rule>
<!--Allow uncommented functions in tests as they usually provide enough
information from their names.-->
<rule ref="Drupal.Commenting.DocComment.MissingShort">
<exclude-pattern>*.Test\.php</exclude-pattern>
<exclude-pattern>*.TestCase\.php</exclude-pattern>
<exclude-pattern>*.test</exclude-pattern>
<exclude-pattern>*\/tests\/behat\/bootstrap/*\.php</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.FunctionComment.Missing">
<exclude-pattern>*.Test\.php</exclude-pattern>
<exclude-pattern>*.TestCase\.php</exclude-pattern>
<exclude-pattern>*.test</exclude-pattern>
<exclude-pattern>*\/tests\/behat\/bootstrap/*\.php</exclude-pattern>
</rule>
<!--Allow long array lines in tests.-->
<rule ref="Drupal.Arrays.Array.LongLineDeclaration">
<exclude-pattern>*.Test\.php</exclude-pattern>
<exclude-pattern>*.TestCase\.php</exclude-pattern>
<exclude-pattern>*.test</exclude-pattern>
</rule>
<!-- Ignore Prefixing class names with project name in module behat tests.-->
<rule ref="DrupalPractice.General.ClassName.ClassPrefix">
<exclude-pattern>*\/tests\/behat\/bootstrap/*\.php</exclude-pattern>
</rule>
<!-- Allow inline block comments until https://www.drupal.org/project/drupal/issues/2305593 is resolved. -->
<rule ref="Drupal.Commenting.InlineComment.DocBlock">
<exclude-pattern>.*</exclude-pattern>
</rule>
</ruleset>