forked from acquia/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
65 lines (55 loc) · 2.95 KB
/
phpcs.xml.dist
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" encoding="UTF-8"?>
<!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="AcquiaCLI"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<description>Acquia CLI PHP CodeSniffer configuration.</description>
<arg name="extensions" value="php,inc,test,css,txt,md,yml"/>
<arg name="colors"/>
<arg name="cache" value="var/.phpcs-cache"/>
<arg name="parallel" value="10"/>
<file>src</file>
<file>tests</file>
<!-- Danger! Exclude patterns apply to the full file path, including parent directories of the current repository. -->
<!-- Don't exclude common directory names like `build`, which will fail on Travis CI because of /home/travis/build/acquia/<project>. -->
<!-- @see https://github.com/squizlabs/PHP_CodeSniffer/issues/981 -->
<exclude-pattern>tests/fixtures/*</exclude-pattern>
<rule ref="AcquiaPHP" />
<rule ref="Drupal.Commenting.InlineComment"/>
<rule ref="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys" />
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration" />
<rule ref="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing" />
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array" value="@author,@created,@version,@package,@copyright,@license,@throws" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
<properties>
<property name="forbiddenCommentPatterns" type="array" value="/Class .*/" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" />
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment" />
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes" />
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="echo" value="$output->writeln"/>
<element key="shell_exec" value="$localmachinehelper->execute"/>
</property>
</properties>
</rule>
</ruleset>