-
Notifications
You must be signed in to change notification settings - Fork 473
/
.pre-commit-config.yaml
92 lines (83 loc) · 2.3 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
exclude: |
(?x) (
archive/|
single_tech_samples/|
e2e_samples/parking_sensors/
)
repos:
# General checks for style
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-ast
- id: check-json
- id: detect-private-key
- id: debug-statements
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
args: ["--unsafe"]
- id: mixed-line-ending
exclude: \.(drawio|drawio\.svg)$
args: [--fix=lf]
- id: check-added-large-files
args: [--maxkb=1024]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--float-to-top"]
name: isort (sorting imports)
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
# args: [--check]
name: black (formatting python code)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
hooks:
- id: ruff
args: [--fix]
name: ruff (linting python code)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
name: mypy (static type checker for Python)
additional_dependencies:
- types-requests
- types-PyYAML
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict, -c=./.yamllint.yaml]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: [--config, ./.markdownlint.yml]
# nbQA is a tool to run all the other tools on Jupyter Notebooks
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-isort
# args: ["--float-to-top"] # to prevent all imports to go to the top
- id: nbqa-black
- id: nbqa-ruff
args: ["--fix"]
- id: nbqa-mypy
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_tflint
- id: terraform_validate
- id: terraform_trivy
args:
- --hook-config=--parallelism-limit=1
- --args=--severity=HIGH,MEDIUM
- --args=--skip-dirs="**/.terraform"