-
Notifications
You must be signed in to change notification settings - Fork 630
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
Validate all-contributors JSON. #3549
Comments
I wonder if an alternative solution would just be to have the CI run the all-contributors CLI tool (to try) to build the updated contributor table? That would highlight any issues with the file itself and could also be a way to ensure that the table in the readme & the source file are in sync? (Happy to be told that this isn't a great idea due to consequences I hadn't thought about!) |
I think not quite. There are cases where all-contributors will run but the input isn't "correct" which results in odd looking tables. There is an example here. |
Gotcha, my (wrong) assumption was that the CLI tool would validate the JSON as part of the build process! The alternative explanation could be though that the validation for that broken JSON would still have passed? Maybe it would be worth running that broken file through the validator to check if that would indeed catch it? |
Yes, actually I'm not 100% sure what the CLI does there. It might recognise that the JSON is wrong, but does it's best effort. Or, the JSON may be valid JSON, just not conforming correctly to the schema so the behaviour is undefined. If we can use the CLI to catch and flag these problems, it would be better than introducing new code. |
Does the CLI have a |
I fear it doesn't! I thought My guess would be that |
Man, if it wasn't written in JS, I'd contribute so many features upstream to this bot (I just don't have time to learn the language) |
💯 There are JS implementations of JSON Schema. |
Just had this exact issue in #3592 ! Definitely demonstrates the need. |
Hi all - I've got a WIP script that might get us closer to sorting this. Opening a PR shortly... |
Summary
Add a CI job to validate the
all-contributors.rc
JSON file.Mistakes in this file can cause the table to be rendered incorrectly.
What needs to be done?
all-contributors.rc
(one here discussed in this issue)Who can help?
Updates
The text was updated successfully, but these errors were encountered: