-
Notifications
You must be signed in to change notification settings - Fork 808
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
Add a package to hold our coding standard #17405
Conversation
Scheduled Jetpack release: November 10, 2020. E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-17405 Thank you for the great PR description! When this PR is ready for review, please apply the |
This can replace #15693 in principle. There is a rule in there that we'd need to bring over, but I like this approach to creating the package more than what I had. |
Ooh, someone tried this before. Nice! Looking for differences... It looks like we did mostly the same things.
|
This will make it a bit cleaner in the future to manage tests and dependencies for the coding standard. And, if some other repo wants to use our coding standards, they can more easily do so. The new coding standard package imports the PHPCompatibility and WordPress standards, so those are removed from `.phpcs.xml.dist`. The phpcs configuration specific to Jetpack remains in `.phpcs.xml.dist`.
7eec79d
to
cadfcaa
Compare
Yup, I'm fine waiting to add rules until after this lands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give this a spin.
Changes proposed in this Pull Request:
This moves the code for custom Jetpack phpcs sniffs into a new package in the monorepo, which will make it easier in the future to import additional sniffs and add tests. It'll also make it easy to reuse the coding standard in any other code repo we might wind up with.
This also adds some tests, and has the WordPress sniffs be pulled in via the Jetpack standard instead of being pulled in on their own.
Jetpack product discussion
None directly, but see p9dueE-1Y9-p2 for the proposal this cleanup is motivated by.
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
composer php:lint
or the like. You might do that bycomposer install && composer php:lint -- --report-file=/tmp/report.old
composer install && composer php:lint -- --report-file=/tmp/report.new
/tmp/report.old
and/tmp/report.new
to see if any unexpected changes were made.Proposed changelog entry for your changes: