-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathphpcs.xml
More file actions
49 lines (41 loc) · 1.74 KB
/
phpcs.xml
File metadata and controls
49 lines (41 loc) · 1.74 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
<?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>
<!-- 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" />
</rule>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<config name="minimum_supported_wp_version" value="5.0.0"/>
<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>