-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpcs.xml
43 lines (38 loc) · 1.49 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
<?xml version="1.0"?>
<ruleset name="custom">
<description>Custom PHPCS standard.</description>
<!-- Using Drupal coding standard as a base-fix. -->
<rule ref="Drupal"/>
<!-- Checks that the strict_types has been declared. -->
<rule ref="Generic.PHP.RequireStrictTypes" />
<!-- Show sniff codes in all reports -->
<arg value="s"/>
<!-- Show progress of the run. -->
<arg value="p"/>
<arg name="colors"/>
<!-- #;< PHP_COMMAND -->
<file>src</file>
<!-- #;> PHP_COMMAND -->
<!-- #;< !PHP_COMMAND -->
<!--
PHP_CodeSniffer does not support scanning of files without extensions, so
we have to use the ugly workaround to copy the file into a file with a 'php'
extension, scan that file, and then delete it.
@see https://github.com/squizlabs/PHP_CodeSniffer/issues/2916
-->
<file>php-script.php</file>
<!-- #;> !PHP_COMMAND -->
<file>tests/phpunit</file>
<!-- 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>
<!-- Allow missing function names in tests. -->
<rule ref="Drupal.Commenting.FunctionComment.Missing">
<exclude-pattern>*.Test\.php</exclude-pattern>
<exclude-pattern>*.TestCase\.php</exclude-pattern>
<exclude-pattern>*.test</exclude-pattern>
</rule>
</ruleset>