forked from leohsiang/generateblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
53 lines (45 loc) · 1.92 KB
/
phpcs.xml.dist
File metadata and controls
53 lines (45 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
53
<?xml version="1.0"?>
<ruleset name="GenerateBlocks">
<description>Rules for GenerateBlocks</description>
<arg name="extensions" value="php" />
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/wordpress*/*</exclude-pattern>
<exclude-pattern>*/dist*/*</exclude-pattern>
<!-- Include the WordPress-Extra standard. -->
<rule ref="WordPress-Extra">
<!--
We may want a middle ground though. The best way to do this is add the
entire ruleset, then rule by rule, remove ones that don't suit a project.
We can do this by running `phpcs` with the '-s' flag, which allows us to
see the names of the sniffs reporting errors.
Once we know the sniff names, we can opt to exclude sniffs which don't
suit our project like so.
-->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/>
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="Generic.Files.LineEndings" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<rule ref="PHPCompatibility"/>
<config name="minimum_supported_wp_version" value="5.0.0"/>
<config name="testVersion" value="5.6-"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="generateblocks"/>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="generateblocks"/>
</property>
</properties>
</rule>
</ruleset>