Skip to content

Commit bee9f05

Browse files
committed
chore: Add doc JSON schema checks and formatting to pre-commit.
1 parent e794aac commit bee9f05

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,29 @@ repos:
3131
exclude: ccan|contrib|tests/fuzz/corpora
3232
types: [ c ]
3333

34+
- repo: https://github.com/python-jsonschema/check-jsonschema
35+
rev: 0.30.0
36+
hooks:
37+
- id: check-jsonschema
38+
name: check doc JSON schemas
39+
args: ["--schemafile", "doc/rpc-schema-draft.json"]
40+
files: ^doc/schemas/.*\.json$
41+
types: [ json ]
42+
43+
- id: check-metaschema
44+
name: check doc JSON metaschemas
45+
args: ["--verbose"]
46+
files: ^doc/schemas/.*\.json$
47+
types: [ json ]
48+
49+
- repo: https://github.com/pre-commit/pre-commit-hooks
50+
rev: v5.0.0
51+
hooks:
52+
- id: pretty-format-json
53+
args: [ "--indent", "2", "--no-sort-keys" ]
54+
files: ^doc/schemas/.*\.json$
55+
types: [ json ]
56+
3457
- repo: https://github.com/codespell-project/codespell
3558
rev: v2.3.0
3659
hooks:

0 commit comments

Comments
 (0)