Skip to content

Commit 3320ef7

Browse files
authored
Merge pull request #763 from Automattic/fix/588-variableanalysis-improve-config
2 parents cf4ced9 + 438e43c commit 3320ef7

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

WordPress-VIP-Go/ruleset.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,6 @@
239239
<severity>0</severity>
240240
</rule>
241241

242-
<!-- Do not report on undefined variables before require nor in file scope. -->
243-
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
244-
<properties>
245-
<property name="allowUnusedVariablesBeforeRequire" value="true"/>
246-
<property name="allowUndefinedVariablesInFileScope" value="true"/>
247-
</properties>
248-
</rule>
249-
250242
<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_key">
251243
<!-- We are silencing this one because VIP Go has a combined index on meta_key, meta_value-->
252244
<severity>0</severity>

WordPressVIPMinimum/ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@
145145

146146
<!-- Include VariableAnalysis checks -->
147147
<rule ref="VariableAnalysis"/>
148+
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
149+
<properties>
150+
<!-- Do not report on unused variables before require nor usused or undefined variables in file scope. -->
151+
<property name="allowUnusedVariablesBeforeRequire" value="true"/>
152+
<property name="allowUndefinedVariablesInFileScope" value="true"/>
153+
</properties>
154+
</rule>
148155

149156
<!-- Prevent deprecation notice when the sniff is not explicitly included. -->
150157
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.DeprecatedSniff">

0 commit comments

Comments
 (0)