-
Notifications
You must be signed in to change notification settings - Fork 88
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
wp scaffold and WPCS #109
Comments
Close via #110 |
Oops, maybe the other files apart from CPT aren't compliant? Edit: no there're not - taxonomy for one. Edit2: Taxonomy fixed now via #112, need to check if there's others... |
@schlessera, @danielbachhuber - is there any Behat logic that would run linters on generated files? That would be great to ensure we scaffold files that are WordPress compliant. |
@gziolo No, but that would be a good addition. I'll create an issue for that. |
Awesome, thanks 🙇 |
to keep track what else needs work
@gitlost @schlessera @gziolo I am checking commands I did that were merged @gziolo you fixed |
Good idea @thrijith ! |
Going to remove this from the 1.1.2 milestone as incomplete at this late stage... |
Yes, I fixed using Gutenberg's configuration. For PHP, it should be the same as core uses. JS part follows Eslint setup, but I hope it is similar to what JSHint promotes. |
Looks like |
fix wpcs in taxonomy generation
fix wpcs in child theme generation
fix wpcs in plugin generation
fix wpcs in theme-tests generation
Command I used rules from the file we are distributing in scaffold - https://github.com/wp-cli/scaffold-command/blob/main/templates/.phpcs.xml.dist Is it worth revisiting our scaffold snippets as in 6 years there has been lots of changes in the sniffer? CC @wp-cli/committers |
Seems reasonable to revisit this & implement some tests to ensure that the scaffolded code always passes PHPCS. |
Files generated by wp scaffold command are not WordPress coding standard compliant!
For example cpt generated:
wp-cli/wp-cli#4589
The text was updated successfully, but these errors were encountered: