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

Disable VariableAnalysis for phpcbf to speed up by 20% #800

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
<type>warning</type>
<severity>3</severity>
</rule>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable">
<rule phpcs-only="true" ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable">
<severity>3</severity>
</rule>
<rule ref="WordPressVIPMinimum.UserExperience.AdminBarRemoval">
Expand All @@ -238,7 +238,7 @@
</rule>

<!-- Silence is golden, these don't affect us on VIP Go -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
<rule phpcs-only="true" ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
<severity>0</severity>
</rule>

Expand Down
5 changes: 2 additions & 3 deletions WordPressVIPMinimum/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@
<message>`%1$s()` performs a no-LIMIT query by default, make sure to set a reasonable `posts_per_page`. `%1$s()` will do a -1 query by default, a maximum of 100 should be used.</message>
</rule>

<!-- Include VariableAnalysis checks -->
<rule ref="VariableAnalysis"/>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<!-- Include VariableAnalysis checks - not loading this for phpcbf significantly (20%) speeds up phpcbf and there are no auto-fixers for this rule -->
<rule phpcs-only="true" 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"/>
Expand Down