forked from acquia/coding-standards-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruleset.xml
53 lines (46 loc) · 2.04 KB
/
ruleset.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../vendor/squizlabs/php_codesniffer/phpcs.xsd"
name="AcquiaDrupalStrict"
>
<description>Acquia's strict Drupal coding standards.</description>
<!-- Drupal sniffs -->
<rule ref="Drupal">
<exclude name="Drupal.Files.TxtFileLineLength.TooLong"/>
</rule>
<!-- Relax rules for automated tests -->
<rule ref="Drupal.Arrays.Array.LongLineDeclaration">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.ClassComment.Missing">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.DocComment.MissingShort">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.FunctionComment.Missing">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.VariableComment.Missing">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- Drupal Practice sniffs -->
<rule ref="DrupalPractice"/>
<!-- Acquia PHP sniffs -->
<rule ref="AcquiaPHP"/>
<!-- Drupal should type hint hooks -->
<!-- @see https://www.drupal.org/project/drupal/issues/3229216 -->
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
</ruleset>