Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rulesets: move VariableAnalysis configuration from Go to Minimum #763

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,6 @@
<severity>0</severity>
</rule>

<!-- Do not report on undefined variables before require nor in file scope. -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<properties>
<property name="allowUnusedVariablesBeforeRequire" value="true"/>
<property name="allowUndefinedVariablesInFileScope" value="true"/>
</properties>
</rule>

<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_key">
<!-- We are silencing this one because VIP Go has a combined index on meta_key, meta_value-->
<severity>0</severity>
Expand Down
7 changes: 7 additions & 0 deletions WordPressVIPMinimum/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@

<!-- Include VariableAnalysis checks -->
<rule ref="VariableAnalysis"/>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<properties>
<!-- Do not report on unused variables before require nor usused or undefined variables in file scope. -->
<property name="allowUnusedVariablesBeforeRequire" value="true"/>
<property name="allowUndefinedVariablesInFileScope" value="true"/>
</properties>
</rule>

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