Skip to content

Commit 9872c01

Browse files
add json related pre-commit hooks
relates to #260 and #267
1 parent 39fb6e2 commit 9872c01

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.pre-commit-config.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
exclude: ^docs/ruby/
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v5.0.0
7+
hooks:
8+
- id: check-symlinks
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
args: [--markdown-linebreak-ext=md]
12+
- id: check-json
13+
exclude: ^\.devcontainer/ # Uses JSONC (comments)
14+
15+
- repo: https://github.com/rbubley/mirrors-prettier
16+
rev: v3.3.3
17+
hooks:
18+
- id: prettier
19+
files: \.json$
20+
21+
- repo: https://github.com/python-jsonschema/check-jsonschema
22+
rev: 0.29.4
23+
hooks:
24+
- id: check-jsonschema
25+
alias: check-jsonschema-inst
26+
files: ^arch/inst/.*\.(yaml|yml)$
27+
args: ["--schemafile", "schemas/inst_schema.json"]
28+
- id: check-jsonschema
29+
alias: check-jsonschema-csr
30+
files: ^arch/csr/.*\.(yaml|yml)$
31+
args: ["--schemafile", "schemas/csr_schema.json"]
32+
- id: check-jsonschema
33+
alias: check-jsonschema-ext
34+
files: ^arch/ext/.*\.(yaml|yml)$
35+
args: ["--schemafile", "schemas/ext_schema.json"]
36+
- id: check-jsonschema
37+
alias: check-jsonschema-cert-model
38+
files: ^arch/certificate_model/.*\.(yaml|yml)$
39+
args: ["--schemafile", "schemas/cert_model_schema.json"]
40+
- id: check-jsonschema
41+
alias: check-jsonschema-cert-class
42+
files: ^arch/certificate_class/.*\.(yaml|yml)$
43+
args: ["--schemafile", "schemas/cert_class_schema.json"]
44+
# Commenting because throwing errors and not sure this is complete yet
45+
# - id: check-jsonschema
46+
# alias: check-jsonschema-manual-version
47+
# files: ^arch/manual/.*\.(yaml|yml)$
48+
# args: ["--schemafile", "schemas/manual_version_schema.json"]

0 commit comments

Comments
 (0)