Repository navigation
v1.3.0
Upgrade: set rev: v1.3.0. Nothing else is needed for the hook. Only a script that parses the
hook's output, or imports pre_commit_hooks.check_json5, needs a change (see Changed).
Added
- Every failure prints as
file:line:col: message, so editors and terminals link to it. - A duplicate key reports its JSON path (
$.server.port), and every repeated key in a file is
listed, not only the first. - On GitHub Actions, each failure is also an annotation on the pull request diff.
--strict GLOBholds matching files to strict JSON: no comments, trailing commas orNaN.
Repeat it to add patterns, and!GLOBexempts files.- Published on PyPI, so
uvx check-json5 FILE...works without pre-commit.
Changed
- The output format:
f.json: Failed to json decode (<string>:4 Unexpected "," at column 8)is
nowf.json:4:8: Unexpected ",". - The module moved from
pre_commit_hooks.check_json5tocheck_json5.check_json5, so the PyPI
package no longer collides withpre-commit-hooks. Thecheck-json5command is unchanged. - Tested on Python 3.15.
Fixed
- A file nested deeper than Python's recursion limit crashed the run and left the remaining files
unchecked. It now fails on its own. - Valid JSON with an integer of more than 4300 digits failed.