Checks JSON files and flags syntax errors
Have you ever updated JSON configuration or ejson secrets, had all your pre-production tests pass and then find you have a missing comma in your production configuration?
Does Buildkite already perform checks on your repository?
This plugin is for you!
This plugin is based on Markdown Lint Buildkite Plugin. It will be useful on some projects at work but I wrote it in my own time and haven't had a chance to try it at work yet. Perhaps check the pulse to see if it's used.
To run the tests locally:
./scripts/test
Add the following to your pipeline.yml
:
steps:
- label: ":json: JSON Lint"
plugins:
- johnsyweb/jsonlint#v1.0.0:
pattern: '*.*json'
Default: *.*json*
The file name pattern, for example *.json
or *.ejson*
. Supports any pattern
supported by find -name.
Default: latest
Version of jsonlint image to use.
- GitHub project
- Bug reports and feature requests are welcome via GitHub Issues
jsonlint-buildkite-plugin
uses MIT license. See
LICENSE.txt
for details.
We welcome contribution from everyone. Read more about it in
CODE_OF_CONDUCT.md
For bug fixes, documentation changes, and features:
- Fork it
- Create your feature branch (
git switch -c my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Run the tests (
./scripts/test
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
For larger new features: Do everything as above, but first also make contact with the project maintainers to be sure your change fits with the project direction and you won't be wasting effort going in the wrong direction.