-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.pre-commit-config.yaml
69 lines (64 loc) · 2.28 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
exclude: ^docs/ruby/ # All generated code
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
args: ["--assume-in-merge"]
exclude: \.adoc$ # sections titles Level 6 "=======" get flagged otherwise
- id: check-json
exclude: ^\.devcontainer/ # Uses JSONC (comments)
- id: check-yaml
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.4.2
hooks:
- id: prettier
files: \.(json|yml|yaml)$
exclude: schemas/json-schema-draft-07.json
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
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"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade