Skip to content

Commit 72061fb

Browse files
committed
Adjust the Toolset ruleset.
1 parent f7a4c3c commit 72061fb

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

standards/Toolset/ruleset.xml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<rule ref="WordPress"/>
88
<rule ref="VariableAnalysis" />
99

10+
11+
<!--
12+
TODO add a sniff for missing translators: comment in Twig templates.
13+
-->
14+
1015
<!--
1116
LOWERING PRIORITY
1217
-->
@@ -15,11 +20,6 @@
1520
<type>warning</type>
1621
</rule>
1722

18-
<!-- Not every parameter needs a comment, sometimes things are obvious. -->
19-
<rule ref="Squiz.Commenting.FunctionComment.MissingParamComment">
20-
<type>warning</type>
21-
</rule>
22-
2323
<!--
2424
EXCLUSIONS
2525
-->
@@ -93,4 +93,32 @@
9393
<severity>0</severity>
9494
</rule>
9595

96+
97+
<!--
98+
This is producing false alarms wherever the string 'meta_key' or 'meta_value' is used,
99+
including unit tests.
100+
-->
101+
<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_key">
102+
<severity>0</severity>
103+
</rule>
104+
<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_value">
105+
<severity>0</severity>
106+
</rule>
107+
108+
109+
<!-- Not every parameter needs a comment, sometimes things are obvious. -->
110+
<rule ref="Squiz.Commenting.FunctionComment.MissingParamComment">
111+
<severity>0</severity>
112+
</rule>
113+
114+
<rule ref="Squiz.Commenting.ClassComment.Missing">
115+
<exclude-pattern>*/phpunit/*</exclude-pattern>
116+
</rule>
117+
118+
<!-- This produces false alarms because we don't use the nonce verfication directly. -->
119+
<rule ref="WordPress.Security.NonceVerification.NoNonceVerification">
120+
<severity>0</severity>
121+
</rule>
122+
123+
96124
</ruleset>

0 commit comments

Comments
 (0)