Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Support the new VIP coding standards project #286

Open
MattGeri opened this issue Jan 15, 2019 · 3 comments
Open

Support the new VIP coding standards project #286

MattGeri opened this issue Jan 15, 2019 · 3 comments

Comments

@MattGeri
Copy link
Contributor

WP Dev Lib currently supports the outdated WordPress-VIP coding standards ruleset that will no longer be supported as of WPCS 2.0.0. Currently, when we pull the WPCS project, we checkout the develop branch which is the beta of 2.0.0 and thus, builds fail when trying to use the WordPress-VIP rules.

The solution is to incorporate https://github.com/Automattic/VIP-Coding-Standards/, but a decision needs to be made on how to include those rules. Should we always install them? Should we selectively include them based on the specified rules of the current project? That would be the most obvious, but is more complex as we would need to parse the rules file in the check-diff.sh script.

@westonruter
Copy link
Contributor

If VIP-Coding-Standards is installed with composer along with WPCS and PHPCS, then it should all work fine as it is today. The AMP plugin is using PHPCompatibility even though wp-dev-lib doesn't know anything about it specifically:

https://github.com/ampproject/amp-wp/blob/c92e129333a8518088a37d47594079b537121d70/phpcs.xml#L35-L39

I think it's best to install all dependencies via composer so that the project can be more specific about its environment.

@kasparsd
Copy link
Contributor

@MattGeri As a temporary fix you can override the WPCS version in .dev-lib like so:

WPCS_GIT_TREE=master

See this section of the readme.

@kasparsd
Copy link
Contributor

Would be nice to add VIP-Coding-Standards to the suggested packages list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants