Awesome Reviewers

Verification · Hygiene · File hygiene

Config syntax validation

Parse every JSON, YAML and TOML file, and validate the important ones against a schema.

How to build it

  1. Add the check-yaml, check-json and check-toml hooks from pre-commit-hooks.
  2. Validate CI workflow and app config files against published JSON schemas with check-jsonschema.
  3. Run the same hooks in CI so a syntax error cannot merge.

Signals in a repository

  • A .pre-commit-config.yaml that lists check-yaml, check-json or check-toml hook ids.
  • A check-jsonschema hook or CI step that names a schema file or schema URL for config files.
  • A CI step that runs pre-commit run --all-files.

In practice

33 repositories run a tool for this check in the scanned set.

  • pre-commit-hooks · 33 repos

Examples