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
- Add the check-yaml, check-json and check-toml hooks from pre-commit-hooks.
- Validate CI workflow and app config files against published JSON schemas with check-jsonschema.
- 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
-
TheAlgorithms/Python ·
pre-commit-hookspre-commit hook check-executables-have-shebangs -
langchain-ai/langchain ·
pre-commit-hookspre-commit hook check-yaml -
langflow-ai/langflow ·
pre-commit-hookspre-commit hook check-case-conflict -
fastapi/fastapi ·
pre-commit-hookspre-commit hook check-added-large-files -
ggml-org/llama.cpp ·
pre-commit-hookspre-commit hook trailing-whitespace