-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathphpcs.xml
More file actions
52 lines (43 loc) · 1.92 KB
/
Copy pathphpcs.xml
File metadata and controls
52 lines (43 loc) · 1.92 KB
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
<?xml version="1.0"?>
<ruleset name="WordPress Theme Coding 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 -->
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description>
<!-- Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
v flag: Print verbose output.
n flag: Do not print warnings.
-->
<arg value="psvn"/>
<!-- Only check the PHP. JS files are checked separately with ESlint and CSS, SCSS files with stylelint. -->
<arg name="extensions" value="php"/>
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Exlude dependencies folder -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Exclude the bundled third-party Kirki library; not our code to lint. -->
<exclude-pattern>*/inc/kirki/*</exclude-pattern>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
<exclude name="WordPress.Files.FileName" />
</rule>
<!-- Verify that the text_domain is set to the desired text-domain. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="flash" />
</property>
</properties>
</rule>
<!-- Include sniffs for PHP cross-version compatibility. -->
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibilityWP"/>
</ruleset>