Skip to content

Commit

Permalink
add json related pre-commit hooks
Browse files Browse the repository at this point in the history
relates to #260 and #267
  • Loading branch information
kbroch-rivosinc committed Nov 20, 2024
1 parent 39fb6e2 commit 9872c01
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
exclude: ^docs/ruby/

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-json
exclude: ^\.devcontainer/ # Uses JSONC (comments)

- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
files: \.json$

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
hooks:
- id: check-jsonschema
alias: check-jsonschema-inst
files: ^arch/inst/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/inst_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-csr
files: ^arch/csr/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/csr_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-ext
files: ^arch/ext/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/ext_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-cert-model
files: ^arch/certificate_model/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/cert_model_schema.json"]
- id: check-jsonschema
alias: check-jsonschema-cert-class
files: ^arch/certificate_class/.*\.(yaml|yml)$
args: ["--schemafile", "schemas/cert_class_schema.json"]
# Commenting because throwing errors and not sure this is complete yet
# - id: check-jsonschema
# alias: check-jsonschema-manual-version
# files: ^arch/manual/.*\.(yaml|yml)$
# args: ["--schemafile", "schemas/manual_version_schema.json"]

0 comments on commit 9872c01

Please sign in to comment.