This repository has been archived by the owner on May 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
56 lines (45 loc) · 1.94 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
<?xml version="1.0"?>
<ruleset name="wp-studiometa">
<!-- Define file and folders to lint -->
<file>./web/wp-content/themes/studiometa/</file>
<file>./web/wp-content/mu-plugins/studiometa-plugin-disabler/</file>
<!-- <file>./web/wp-content/plugins/studiometa-.../</file> -->
<!-- <file>./web/wp-content/mu-plugins/studiometa-.../</file> -->
<!-- Skip seed data -->
<exclude-pattern>/data/</exclude-pattern>
<!-- Skip LocalValetDriver -->
<exclude-pattern>LocalValetDriver.php</exclude-pattern>
<!-- Don't check composer dependencies -->
<exclude-pattern>/vendor/</exclude-pattern>
<!--
Ending tags '?>' can be really painful to debug.
Just disallow them in the end of the file
-->
<rule ref="PSR2.Files.ClosingTag.NotAllowed"/>
<!-- <?php tags and constants (true,false,null) need to be lowercase -->
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="WordPress">
<!-- There are numerous cases where we want to override WP globals -->
<exclude name="WordPress.WP.GlobalVariablesOverride" />
</rule>
<!-- Disable class-classname.php file naming for app folder -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>/app/</exclude-pattern>
<exclude-pattern>/studiometa-plugin-disabler/studiometa-plugin-disabler.php</exclude-pattern>
</rule>
<!-- Allow UpperCaseClasses file names in app folder -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>/app/</exclude-pattern>
</rule>
<!-- Run against the PHPCompatibilityWP ruleset -->
<rule ref="PHPCompatibilityWP" />
<!-- Check for cross-version support for PHP 7.3 and higher -->
<config name="testVersion" value="7.3-"/>
<!-- Allow usage of `{@inheritdoc}` in doc blocks -->
<rule ref="Squiz.Commenting.FunctionComment">
<properties>
<property name="skipIfInheritdoc" value="true" />
</properties>
</rule>
</ruleset>