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

WordPress-VIP-Go: Remove WordPress.WP.GlobalVariablesOverride.Prohibited #635

Merged
merged 3 commits into from
Mar 9, 2021

Conversation

rebeccahum
Copy link
Contributor

Per @jrfnl's recommendation, we should just remove the rule since it hasn't been used for awhile anyways.

Copy link
Collaborator

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify: I recommended for the severity change in the VIP-Go ruleset to be removed. The VIPMinimum ruleset includes the sniff and VIP-Go inherits from VIPMinimum, so once the severity change is removed, all issues will (and should) still be reported and reported at severity 5.

This also means that:

  • The VIP-Go ruleset test should not be adjusted. The error should still be thrown, just at severity 5, not 3.
  • If the ruleset test currently does not receive the error, something else may be going on and would need investigating.
  • As for line 300 - once the tests on line 187/188 are brought back, that line should not need to be changed.

@rebeccahum
Copy link
Contributor Author

Ah, I totally misunderstood what you meant by severity change (I thought it meant remove the rule) — I've updated the PR to reflect that correctly now.

<!-- This is often a false positive. Still nice to flag for a check -->
<severity>3</severity>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not needed. The sniff (including this error code) is inherited from WordPressVIPMinimum, so doesn't have to be included explicitly.

Only reason to still have it, would be if the property I mentioned in my comment would be added: #610 (comment)

Copy link
Contributor Author

@rebeccahum rebeccahum Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll keep the property disabled for the time being since it seems to be discouraged per:

Unfortunately, at this time, it is not possible to set this property for only a select group of files. With that in mind, setting this property is discouraged.

If we receive reports of it being an issue, we can re-visit later I'm thinking.

@jrfnl jrfnl added this to the 2.3.0 milestone Mar 9, 2021
@rebeccahum rebeccahum merged commit 1fa0266 into develop Mar 9, 2021
@rebeccahum rebeccahum deleted the rebecca/610_followup branch March 9, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants