-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpcs.ruleset.xml
61 lines (52 loc) · 2.21 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
54
55
56
57
58
59
60
61
<?xml version="1.0"?>
<ruleset name="WordPress Theme Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<description>A custom set of code standard rules to check for WordPress themes.</description>
<rule ref="WordPress">
<!-- TODO: look what is really needed to exclude and what is wantet. -->
<exclude name="Squiz.Commenting.BlockComment.NoCapital" />
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound" />
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!--
Add additional word deliniter to allow ACF hook names.
-->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="foundationpress"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="foundationpress"/>
<element value="fopr"/>
</property>
</properties>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="is_theme" value="true"/>
</properties>
<exclude-pattern>/inc/*</exclude-pattern>
</rule>
</ruleset>