forked from htmlburger/wpemerge-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
55 lines (46 loc) · 2.08 KB
/
phpcs.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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="WPEmergeTheme">
<description>Theme Coding Standard</description>
<!-- Excludes -->
<exclude-pattern>app/src/*</exclude-pattern>
<exclude-pattern>dist/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>wpcs/*</exclude-pattern>
<exclude-pattern>*/*.css</exclude-pattern>
<exclude-pattern>*/*.js</exclude-pattern>
<rule ref="WordPress">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals" />
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterDefault" />
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
<exclude name="Squiz.Commenting.BlockComment.NoNewLine" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.Files.FileName.UnderscoresNotAllowed" />
</rule>
<!-- Allow whitespace at the beginning of files in fragments -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<exclude-pattern>theme/partials/*</exclude-pattern>
<exclude-pattern>theme/footer.php</exclude-pattern>
<exclude-pattern>theme/footer-*.php</exclude-pattern>
</rule>
<rule ref="WordPress-Extra">
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing"/>
<exclude name="WordPress.XSS.EscapeOutput"/>
</rule>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<!-- Add in some extra rules from other standards. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="string" value="app"/>
</properties>
</rule>
</ruleset>