-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
83 lines (69 loc) · 3.26 KB
/
Copy pathphpcs.xml
File metadata and controls
83 lines (69 loc) · 3.26 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0"?>
<ruleset name="PDF Invoice Generator for MemberPress">
<description>WordPress Coding Standards for PDF Invoice Generator for MemberPress</description>
<!-- What to scan -->
<file>.</file>
<!-- Exclude vendor and node_modules -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/release/*</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>*.min.css</exclude-pattern>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotate source code to ignore specific rules: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-specific-sniffs -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
<!-- Rules: Check PHP version compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-php-version-compatibility -->
<config name="testVersion" value="7.4-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.0"/>
<rule ref="WordPress">
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
<properties>
<property name="prefixes" type="array" value="MPBIG"/>
</properties>
</rule>
<!-- Verify that everything in the global namespace is prefixed with a theme/plugin specific prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound">
<severity>5</severity>
<exclude-pattern>install.php</exclude-pattern>
<exclude-pattern>uninstall.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound">
<severity>5</severity>
<exclude-pattern>install.php</exclude-pattern>
<exclude-pattern>uninstall.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound">
<severity>5</severity>
<exclude-pattern>install.php</exclude-pattern>
<exclude-pattern>uninstall.php</exclude-pattern>
</rule>
<!-- Allow for translator comments -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="pdf-invoice-generator-for-memberpress"/>
</properties>
</rule>
<!-- Verify that text strings are translatable -->
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<severity>5</severity>
</rule>
<!-- Allow print_r and var_dump for debugging -->
<rule ref="WordPress.PHP.DevelopmentFunctions">
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log"/>
</rule>
</ruleset>