-
Notifications
You must be signed in to change notification settings - Fork 57
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
Implement readme parser check in trunk
#322
Comments
Related: That command also uses the |
Thanks for flagging @swissspidy! I think we could potentially combine the two issues, but maybe yours also would encompass things that go beyond this issue (as this issue is focused only on achieving parity with the I looked at your related WP-CLI command and have two questions:
|
Both use a copy of the parser class from Meta SVN, so it's the same thing. I think my copy is now just a little outdated as I haven't touched that code in a while. For example it's missing the
That is correct, yes. |
Quick question: Which parser do we needs to use? |
For the parser itself, we can use For reporting errors based on the parser results, we can look at validate-readme-command for inspiration for sure. |
FWIW it's my intention to keep the readme-parser updated. I've made it simple to do this. I only need to be aware of when updates occur or run command in the repository at regular intervals. |
If interested you can take a look at the class I use to interact with the readme-parser here, https://github.com/afragen/git-updater/blob/develop/src/Git_Updater/Readme_Parser.php |
I am working on this. |
The
legacy-plugin
branch has checks that rely onafragen/wordpress-plugin-readme-parser
to actually parse the plugin readme, a feature that is currently missing from thetrunk
branch for the new plugin version.We should refactor (and by that enhance) our
Plugin_Readme_Check
to rely on theWordPressdotorg\Plugin_Directory\Readme\Parser
class:$readme
array, since that array will only have 0 or 1 entries anyway.Parser
and the single file path, and refactor the logic to use the class instead of manually parsing the file contents.check_for_warnings
, to ensure we catch other warnings the parser has encountered. While doing that, let's already implement the code from Create a way to remove certain readme warnings, contributors_ignored. #276 in that new method, to address that problem.The text was updated successfully, but these errors were encountered: