Skip to content

Commit cd0ecb8

Browse files
add yaml related pre-commit hooks
relates to #260
1 parent 39fb6e2 commit cd0ecb8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.pre-commit-config.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
- id: check-yaml
15+
16+
- repo: https://github.com/rbubley/mirrors-prettier
17+
rev: v3.3.3
18+
hooks:
19+
- id: prettier
20+
files: \.(json|yml|yaml)$
21+
22+
- repo: https://github.com/python-jsonschema/check-jsonschema
23+
rev: 0.29.4
24+
hooks:
25+
- id: check-jsonschema
26+
alias: check-jsonschema-inst
27+
files: ^arch/inst/.*\.(yaml|yml)$
28+
args: ["--schemafile", "schemas/inst_schema.json"]
29+
- id: check-jsonschema
30+
alias: check-jsonschema-csr
31+
files: ^arch/csr/.*\.(yaml|yml)$
32+
args: ["--schemafile", "schemas/csr_schema.json"]
33+
- id: check-jsonschema
34+
alias: check-jsonschema-ext
35+
files: ^arch/ext/.*\.(yaml|yml)$
36+
args: ["--schemafile", "schemas/ext_schema.json"]
37+
- id: check-jsonschema
38+
alias: check-jsonschema-cert-model
39+
files: ^arch/certificate_model/.*\.(yaml|yml)$
40+
args: ["--schemafile", "schemas/cert_model_schema.json"]
41+
- id: check-jsonschema
42+
alias: check-jsonschema-cert-class
43+
files: ^arch/certificate_class/.*\.(yaml|yml)$
44+
args: ["--schemafile", "schemas/cert_class_schema.json"]
45+
# Commenting because throwing errors and not sure this is complete yet
46+
# - id: check-jsonschema
47+
# alias: check-jsonschema-manual-version
48+
# files: ^arch/manual/.*\.(yaml|yml)$
49+
# args: ["--schemafile", "schemas/manual_version_schema.json"]

0 commit comments

Comments
 (0)