Add automated JSON schema validation#8039
Conversation
madhusudhand
left a comment
There was a problem hiding this comment.
Thanks @ajlende for the changes. It is amazing 🥇
I dropped few comments inline.
0c21163 to
69ac8fe
Compare
madhusudhand
left a comment
There was a problem hiding this comment.
Excellent work! 🙇
The new table format looks neat and is very helpful to quickly fix the changes.
Changes looks good to me. 🚀
@vcanales Bot posted preview links even though there are no relevant changes for these themes. (or may be one of the commit had those changes). Edit: Hmm, I did a quick test of the script, and it seems to be removing links based on the latest push. Created an issue here: WordPress/action-wp-playground-pr-preview#19 |
Changes proposed in this Pull Request:
Adds an npm script and GitHub action for validating JSON for themes.
$schemaversion doesn't match the minimum WP version.Validation script
I may have had a bit too much fun with building the tables and adding colors, so the code exploded a bit. 😅
But I think the new result is really nice. ✨
And it works with pagers.
Or without if you only have a theme or two to validate.
And the added
--format=jsonoption is also super helpful when combined withjqto drill down into the data.For example, this is the breakdown of all the current themes and a count of the types of problems that they have:
GitHub Action
The GitHub action only runs on the modified themes.
It can be tested by committing some modifications to a theme and running like this:
Related issue(s):