-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathphpcs.ruleset.xml
53 lines (43 loc) · 1.9 KB
/
phpcs.ruleset.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
<?xml version="1.0"?>
<ruleset name="Krokedil Coding Standards">
<description>WooCommerce dev PHP_CodeSniffer ruleset.</description>
<!-- Exclude vendor and node_modules from all rules -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Exclude the tests folder -->
<exclude-pattern>tests/*</exclude-pattern>
<!-- Configs - Maybe? -->
<config name="minimum_supported_wp_version" value="6.2" />
<config name="testVersion" value="7.3-" />
<!-- Use Wordpress Coding standards -->
<rule ref="WordPress" />
<!-- Enforce the correct text-domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="klarna-payments-for-woocommerce" />
<element value="woocommerce" />
</property>
</properties>
</rule>
<!-- Remove WordPress.Files.FileName.InvalidClassFileName checks to allow for PSR-4 naming convention -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>src/</exclude-pattern>
</rule>
<!-- Remove WordPress.Files.FileName.NotHyphenatedLowercase checks to allow for PSR-4 naming convention -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>src/</exclude-pattern>
</rule>
<!-- Remove need for package tag in file block comments -->
<rule ref="Squiz.Commenting.FileComment.MissingPackageTag">
<exclude-pattern>src/</exclude-pattern>
</rule>
<!-- Remove need for file comment -->
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>src/</exclude-pattern>
</rule>
<!-- Allow the usage of shorthand arrays -->
<rule ref="Universal.Arrays.DisallowShortArraySyntax.Found">
<exclude-pattern>src/</exclude-pattern>
</rule>
</ruleset>