Skip to content

Commit e5560cd

Browse files
committed
chore: Add doc JSON schema checks and formatting to pre-commit.
1 parent 41003ee commit e5560cd

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
@@ -30,6 +30,29 @@ repos:
3030
entry: clang-format
3131
types: [ c ]
3232

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

0 commit comments

Comments
 (0)