Skip to content

Commit fd6a933

Browse files
committed
Allow WPThemeReview's non-PHP sniffs
Allow WPThemeReview's non-PHP sniffs but excludes bootstrap.js, bootstrap.bundle.js and theme.js. bootstrap.js includes the comment '// Shoutout AngusCroll (https://goo.gl/pxwQGp)'.
1 parent 7014930 commit fd6a933

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

phpcs.xml.dist

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
<description>Apply WordPress Coding Standards to UnderStrap</description>
55

6-
<!-- Only scan PHP files. -->
7-
<arg name="extensions" value="php"/>
8-
96
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
107
<arg name="cache" value=".phpcs-cache"/>
118

@@ -34,7 +31,9 @@
3431
<exclude-pattern>/dist-product/*</exclude-pattern>
3532

3633
<!-- Use the WordPress Ruleset -->
37-
<rule ref="WordPress"/>
34+
<rule ref="WordPress">
35+
<include-pattern>*\.php$</include-pattern>
36+
</rule>
3837

3938
<!--
4039
Verify that the text_domain is set to the desired text-domain.
@@ -87,4 +86,13 @@
8786

8887
<!-- Use the WPThemeReview Ruleset -->
8988
<rule ref="WPThemeReview" />
89+
90+
<!--
91+
Exclude checking for shortened URLs in Bootstrap's js. files.
92+
Also exlude theme.js which includes bootstrap.js.
93+
-->
94+
<rule ref="WPThemeReview.Privacy.ShortenedURLs.Found">
95+
<exclude-pattern>/src/js/bootstrap4/bootstrap\.*js</exclude-pattern>
96+
<exclude-pattern>/js/theme\.js</exclude-pattern>
97+
</rule>
9098
</ruleset>

0 commit comments

Comments
 (0)