-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update to WPCS 3.0.0 #175
Comments
This can be run from the ./foreach-bundle "composer require --quiet --dev wp-cli/wp-cli-tests:^4"
./foreach-bundle "composer phpcs" This way we can identify additional things we might want to add to the default PHPCS config, like for example https://github.com/wp-cli/wp-cli-tests/pull/176/files#r1310157136 At first glance it appears that most of the errors can be auto-fixed, reducing the amount of manual work involved with updating. Edit: looks like you already tagged a new release; so I updated the command accordingly. |
I'm getting an odd warning with
Yeah, I had to tag in order to start updating the dependencies.
Want to submit a PR for that? |
You need to rename wp-cli-tests/WP_CLI_CS/ruleset.xml Lines 112 to 116 in bd3f6d6
I think we can do all of these ruleset updates in a single PR |
@swissspidy Sure... are you doing that? |
Started a PR here: #177 |
I also use that script for doing things like this in a case like the above (built from memory and untested): ./foreach-bundle "git checkout -b fix/wpcs-3.0-issues"
./foreach-bundle "composer require --quiet --dev wp-cli/wp-cli-tests:^4 -W"
./foreach-bundle "git add composer.*"
./foreach-bundle "git commit -m 'Update to WPCS v3'"
./foreach-bundle "vendor/bin/phpcbf"
./foreach-bundle "git add --all"
./foreach-bundle "git commit -m 'Fix all autofixable CS issues'"
./foreach-bundle "hub pull-request -m 'Update to WPCS v3' -l 'scope:testing' -m 'Auto-generated PR that updates WPCS to the latest v3 and then runs PHPCBF to fix all automatically fixable issues.'" This will create a pull request in each bundle repository. Those that pass their tests can be merged right away, the others will be starting points for additional commits to fix any remaining issues. This has been the most scalable way for working on bundle-wide changes for me. |
I can run the above (and adapt as needed to create all initial PRs now. Let me do those, and then we can see what else might still need fixing. |
🎉 |
WPCS 3.0.0 was recently released. We should update WP-CLI to use it!
https://github.com/WordPress/WordPress-Coding-Standards/wiki/Upgrade-Guide-to-WordPressCS-3.0.0-for-Developers-of-external-standards
Done is:
The text was updated successfully, but these errors were encountered: