-
Notifications
You must be signed in to change notification settings - Fork 40
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
Deprecate WordPressVIPMinimum ruleset #600
Comments
I guess technically, we could deprecate the Go ruleset and move everything on there to the VIPMinimum depending on which way we want to go about things...but I don't think it's necessary to have two rulesets anymore. |
VIPCS contains two standards - The VIP Go standard doesn't have sniffs of it's own - it references sniffs that are under the The relevant part of the VIPCS repo looks like this:
Understanding what severity level and message applies when using the VIP Go standard means checking:
...as each item here overrides the one below it. With the WordPress.com VIP Platform no longer being used, we have the option to simplify this down. This would make maintenance easier in the long run. One of the negatives of the current naming system, is that the platform ("VIP Go") is specifically mentioned, but in the long term this should just be platform agnostic like "VIP" or We could have something like:
There seems to be three options for the changes here:
I would strongly recommend that these changes are done as a major release. As part of the updates, we would also:
|
I think 1) would be good short-term as the least breaking change for the time being. And then for a bigger release afterwards, I'm a fan of eventually implementing the structure of 2), but I'm uncertain how large of an impact it would have on our customers. |
I've got some thoughts on this and am writing them up. Bear with me and you'll have my input on this within the next few days. |
Thanks for opening this issue to discuss this. Sorry took a little longer for me to respond (I wanted to run some tests to make sure I wasn't misrepresenting anything), but here goes. Making sure we're all on the same page
The namespace for the sniffs MUST be the same as the standard name, though it can have a prefix. This is a requirement for PHPCS to recognize the sniffs and autoload them correctly. So the prefix could be Note: as I'm sure you are well aware of already: sniffs can not be moved into the
The
With this in mind, I'd strongly recommend against any solution which would involve removing the
Same remarks as for 1) regarding the removal of the
What is not mentioned here, is that this includes the same breaking change as per 2) where all the non-deprecated sniffs, i.e. all the sniffs which will still be used by Observations about the rulesets/messages/severity
When consolidating, the message content and type changes for the VIP native sniffs should be moved to the actual sniffs and removed from the As for the About standard namesIf a (base) standard rename would take place, I would recommend using a short, simple, generic name, not linked to a specific platform variant - like
So, in case a standard rename would take place, I'd suggest something like About consolidating the rulesets to oneIf the
In other words, I'd recommend sticking with two standards, split between 1) a standard with sniffs and no further customizations in the ruleset and 2) a platform specific ruleset, which would include external sniffs as well and possibly minor customizations for the notice severity of some messages. Users of the coding standards
While your primary audience is the VIP platform customers and decisions should be primarily based on the impact on them, these coding standards do have a secondary audience as well.
In some cases, this means the standards are included in custom If we're talking numbers:
Note: these numbers are based on public repos only. Private repos are not shown in any of these searches. Also: as a number of external standards use the VIP sniffs, the actual number of external user repos will likely be higher as I have not searched for references to/stats for those external standards. Possible strategiesTaking all the above into account, here are some outlines for possible strategies. Goals/constraints
Strategy: Break as little as possibleWith the "Break as little as possible" strategy:
Advantages:
Disadvantages:
Strategy: Break and be done with itWith the "Break and be done with it" strategy:
Advantages:
Disadvantages:
Strategy: Gradual change-over, clean breakWith the "Gradual change-over, clean break" strategy:
Advantages:
Disadvantages:
Other considerationsIt could be considered to move the references to the external sniffs to a separate ruleset It would also be beneficial if at some point in the future a new, different VIP platform based ruleset would be needed which would have a significant overlap with the Then again, in a way, we'd be then setting things up for a potential event in the future, which may never happen, so it could just as easily be argued that having a Depending on preferred strategy I could work out a detailed roadmap of all steps which would need to be taken to implement that strategy. What do you think ? |
Thank you for the well thought-out response, @jrfnl!
I'm a fan of using "WPVIP" as the standard name, as it is in line with our current domain (wpvip.com).
I don't think we should worry about this since that the likeliness of that is yet to be determined.
Would 2) have to be platform specific if we want to move towards platform agnostic in our naming conventions? Could 1)'s purpose be there as a parent for inheritance? The gradual change-over, clean break approach seems the best to me since it gives users time to update their references, while accounting for our need to reflect the status quo . |
With all sites migrated to Go, I think we can deprecate https://github.com/Automattic/VIP-Coding-Standards/blob/develop/WordPressVIPMinimum/ruleset.xml and use https://github.com/Automattic/VIP-Coding-Standards/blob/develop/WordPress-VIP-Go/ruleset.xml as the main source of truth.
The text was updated successfully, but these errors were encountered: