Linting json
check-jsonschema
Buildin schemas
- Builtin schemas
- see also src/check_jsonschema/builtin_schemas
- The '--builtin-schema' flag supports the following schema names:
- vendor.azure-pipelines
- vendor.bamboo-spec
- vendor.bitbucket-pipelines
- vendor.buildkite
- vendor.circle-ci
- vendor.cloudbuild
- vendor.dependabot
- vendor.drone-ci
- vendor.github-actions
- vendor.github-workflows
- vendor.gitlab-ci
- vendor.readthedocs
- vendor.renovate
- vendor.taskfile
- vendor.travis
- vendor.woodpecker-ci
- custom.github-workflows-require-timeout
Here the most interesting:
gitlab-ci- Validate GitLab CI config against the schema provided by SchemaStoregithub-actionsgithub-workflowsreadthedocsrenovate
Install
sudo pacman -S check-jsonschema
cli usage
Builtin schema:
check-jsonschema --builtin-schema vendor.gitlab-ci .gitlab-ci.yml
Schema URL:
check-jsonschema -v \
--schemafile https://raw.githubusercontent.com/goss-org/goss/master/docs/schema.yaml \
goss.yaml
remote schemas
pre-commit usage
repos:
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
hooks:
- id: check-gitlab-ci
Different jsonlint linters
- zaach/jsonlint: javascript, supported
by null-ls
brew install jsonlint - python3-demjson: Unmaintained, last commit 2015
- Seldaek/jsonlint: php, unmaintained