-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathphpcs.xml.dist
74 lines (65 loc) · 2.65 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
66
67
68
69
70
71
72
73
74
<?xml version="1.0"?>
<ruleset name="Prometheus 2 Code Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki -->
<!-- See https://github.com/wimg/PHPCompatibility -->
<!-- See https://github.com/Automattic/_s/blob/master/phpcs.xml.dist -->
<description>Custom rules for Prometheus 2.</description>
<!-- Check files in this directory and subdirectories. -->
<file>.</file>
<!-- Prevent sniffs of some directories. -->
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<!-- Pass flags to PHPCS:
p: Show progress of the run.
s: Show sniff codes in all reports.
v: Print verbose output.
-->
<arg value="psv"/>
<arg name="colors"/>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Set a basepath to remove user environment specific paths from the results. -->
<arg name="basepath" value="."/>
<!-- Enable parallel processing which will speed up the sniffs if available. -->
<arg name="parallel" value="32"/>
<!-- Test PHP cross-version compatibility. -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="4.8"/>
<!-- Use the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
</rule>
<!-- Page templates currently use underscores for historic reasons. -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>page_landing.php</exclude-pattern>
</rule>
<!-- Check for correct text domain on all translatable strings. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="prometheus2"/>
</property>
</properties>
</rule>
<!-- Check all globals have the expected prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="CHILD_THEME"/>
<element value="CHILD_TEXT_DOMAIN"/>
</property>
</properties>
</rule>
<!-- Allow theme-specific exceptions to WordPress filename rules. -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="is_theme" value="true"/>
</properties>
</rule>
</ruleset>