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
Merged
Changes from 2 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
5 changes: 1 addition & 4 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@
<!-- We trust that translations are safe on VIP Go -->
<severity>1</severity>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<!-- 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.

<rule ref="WordPress.WP.EnqueuedResources.NonEnqueuedScript">
<type>warning</type>
<severity>3</severity>
Expand Down