-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathphpcs.xml
More file actions
65 lines (55 loc) · 2.63 KB
/
phpcs.xml
File metadata and controls
65 lines (55 loc) · 2.63 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
61
62
63
64
65
<?xml version="1.0"?>
<!--
To override this file, copy it to phpcs.xml and then modify.
@see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml#the-annotated-sample-file
-->
<ruleset name="blt">
<description>BLT PHP_CodeSniffer standards overrides.</description>
<!-- By default, warnings and errors cause an exception. -->
<config name="ignore_warnings_on_exit" value="0" />
<config name="ignore_errors_on_exit" value="0" />
<!-- Set extensions to scan (taken from Coder 8.3.6). -->
<!-- @see https://git.drupalcode.org/project/coder/blob/8.3.6/coder_sniffer/Drupal/ruleset.xml#L8 -->
<arg name="extensions" value="php,module,inc,install,test,profile,theme"/>
<!-- Set ignore extensions. -->
<!-- @see https://www.drupal.org/node/2867601#comment-12075633 -->
<arg name="ignore" value="*.css,*.md,*.txt,*.png,*.gif,*.jpeg,*.jpg,*.svg"/>
<!-- Use colors in output. -->
<arg name="colors"/>
<!-- Show progress. -->
<arg value="p"/>
<!-- Print the actual rule that is breaking -->
<arg value="s"/>
<!-- Include existing standards. -->
<rule ref="Drupal">
<exclude name="Drupal.InfoFiles.AutoAddedKeys"/>
</rule>
<rule ref="DrupalPractice">
<!-- Ignore specific sniffs. -->
<exclude name="DrupalPractice.InfoFiles.NamespacedDependency"/>
</rule>
<!-- Include the AlphabeticallySortedUses.IncorrectlyOrderedUses rule -->
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses" />
<file>blt/src</file>
<file>docroot/modules/custom</file>
<file>docroot/themes/custom</file>
<file>docroot/profiles/custom</file>
<file>tests</file>
<exclude-pattern>*/behat</exclude-pattern>
<exclude-pattern>*/node_modules</exclude-pattern>
<exclude-pattern>*/vendor</exclude-pattern>
<exclude-pattern>*/*settings.php</exclude-pattern>
<exclude-pattern>*/hooks</exclude-pattern>
<exclude-pattern>*/factory-hooks</exclude-pattern>
<exclude-pattern>*/sites/g</exclude-pattern>
<exclude-pattern>*/sites/sites.php</exclude-pattern>
<exclude-pattern>*/cypress</exclude-pattern>
<!-- Exclude our JS that follows our own linting standards -->
<exclude-pattern>*/themes/custom/ncids_trans/front-end</exclude-pattern>
<exclude-pattern>*/themes/custom/ncids_trans/dist</exclude-pattern>
<exclude-pattern>*/themes/custom/cgov/src</exclude-pattern>
<exclude-pattern>*/themes/custom/cgov/cgov_common/*.js</exclude-pattern>
<exclude-pattern>*/themes/custom/cgov/cgov_common/src</exclude-pattern>
<exclude-pattern>*/themes/custom/cgov/cgov_common/dist</exclude-pattern>
<exclude-pattern>docroot/modules/custom/nci_definition/*.js</exclude-pattern>
</ruleset>