-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
72 lines (59 loc) · 2.69 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
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd"
name="Syde-PHPCS"
>
<description>The coding standard for the Syde PHP Coding Standards package itself.</description>
<!-- Report warnings, but return zero exit code. -->
<config name="ignore_warnings_on_exit" value="1" />
<!-- Check for cross-version support for PHP 8.1 and higher. -->
<config name="testVersion" value="8.1-" />
<file>./Syde</file>
<file>./tests</file>
<exclude-pattern>*/tests/e2e/test-package/*</exclude-pattern>
<exclude-pattern>*/tests/fixtures/*</exclude-pattern>
<!-- Use colors, and show sniff error codes and progress. -->
<arg name="colors" />
<arg value="sp" />
<rule ref="Syde-Extra" />
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="Syde/Helpers" value="SydeCS\Syde\Helpers" />
<element key="Syde/Sniffs" value="SydeCS\Syde\Sniffs" />
<element key="tests/e2e" value="SydeCS\Syde\Tests" />
<element key="tests/src" value="SydeCS\Syde\Tests" />
<element key="tests/unit" value="SydeCS\Syde\Tests" />
</property>
</properties>
</rule>
<rule ref="Syde.Classes.DisallowGetterSetter">
<exclude-pattern>/Syde/Sniffs/Functions/DisallowCallUserFuncSniff.php</exclude-pattern>
</rule>
<rule ref="Syde.Functions.ArgumentTypeDeclaration">
<properties>
<property name="allowedMethodNames" type="array">
<element value="process" />
</property>
</properties>
</rule>
<rule ref="Syde.Functions.FunctionLength">
<exclude-pattern>/tests/unit/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput.ExceptionNotEscaped">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/tests/bootstrap.php</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv">
<exclude-pattern>/tests/bootstrap.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_fclose">
<exclude-pattern>/tests/src/FixtureContentParser.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_fopen">
<exclude-pattern>/tests/src/FixtureContentParser.php</exclude-pattern>
</rule>
</ruleset>