-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
93 lines (84 loc) · 2.47 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
93
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: .*\.tsv|.*\.md
- id: check-toml
- id: check-yaml
- id: check-json
- id: pretty-format-json
exclude: .*.ipynb
args: [--autofix]
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-added-large-files
args: [--maxkb=50000]
- id: no-commit-to-branch
args: [--branch=master]
- id: debug-statements
- id: name-tests-test
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2', --implicit_start]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
- repo: local
hooks:
- id: poetry_lock
name: Check if poetry is updated
entry: |
python -c "
from poetry.factory import Factory
l = Factory().create_poetry('.').locker
if l.is_locked() and l.is_fresh():
exit(0)
else:
print('run `poetry update` to fix')
exit(1)
"
language: python
additional_dependencies:
- poetry
verbose: true
files: pyproject.toml
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.19.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies:
- '@commitlint/config-conventional'
- repo: https://github.com/hadolint/hadolint
rev: v2.13.1-beta
hooks:
- id: hadolint-docker
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
- id: terraform_tflint
args:
- --args=--fix
- --hook-config=--tf-path=tofu
- repo: https://github.com/terraform-docs/terraform-docs
rev: v0.19.0
hooks:
- id: terraform-docs-go
args: [markdown, table, --recursive, --hide-empty=true, --output-file, README.md, --output-mode, inject, infrastructure]