-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.phpcs.xml.dist
54 lines (48 loc) · 1.79 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
<?xml version="1.0"?>
<ruleset name="Screenly Cast">
<description>Screenly Cast Coding Standards</description>
<!-- What to scan -->
<file>screenly-cast</file>
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/build/</exclude-pattern>
<exclude-pattern>/dist/</exclude-pattern>
<exclude-pattern>rector.php</exclude-pattern>
<!-- How to scan -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/>
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="parallel" value="8"/>
<arg name="extensions" value="php"/>
<arg name="warning-severity" value="0"/> <!-- Don't show warnings -->
<config name="ignore_warnings_on_exit" value="1"/> <!-- Don't let warnings affect exit code -->
<!-- Rules: WordPress Coding Standards -->
<config name="minimum_supported_wp_version" value="6.4"/>
<rule ref="WordPress">
<!-- Allow proper namespacing -->
<exclude name="WordPress.Files.FileName"/>
<!-- Allow PSR-4 autoloading -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<!-- Allow :: operator for static calls -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="true"/>
</properties>
</rule>
<!-- Enforce PSR-4 -->
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="screenly-cast/inc" value="ScreenlyCast"/>
<element key="screenly-cast/inc/Contracts" value="ScreenlyCast\Contracts"/>
</property>
</properties>
</rule>
<!-- PHP compatibility -->
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibility"/>
</ruleset>