-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
74 lines (71 loc) · 2.17 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types: [pre-commit, commit-msg]
default_language_version:
python: python3.12
repos:
- repo: local
hooks:
- id: end-of-file-fixer
name: Checking empty files
language: system
types: [python]
entry: poetry run end-of-file-fixer
- id: check-yaml
name: Checking yaml files
language: system
types: [yaml]
entry: poetry run check-yaml
- id: check-toml
name: Checking toml files
language: system
types: [toml]
entry: poetry run check-toml
- id: check-added-large-files
name: Checking large files
language: system
types: [python]
entry: poetry run check-added-large-files
- id: check-ast
name: Checking python files
language: system
types: [python]
entry: poetry run check-ast
- id: fix-byte-order-marker
name: Checking utf-8 byte order marker
language: system
types: [python]
entry: poetry run fix-byte-order-marker
- id: debug-statements
name: Checking for debug statements
language: system
types: [python]
entry: poetry run debug-statement-hook
- id: lint
name: Run lint with ruff
language: system
types: [python]
entry: poetry run ruff check --fix
exclude: ^docs[\\\/]source[\\\/]*
stages: [pre-commit]
- id: format
name: Run lint with ruff
language: system
types: [python]
entry: poetry run ruff format
exclude: ^docs[\\\/]source[\\\/]*
stages: [pre-commit]
- id: commitmsg
name: Check commit message
entry: poetry run cz check --allow-abort --commit-msg-file
stages: [commit-msg]
language: system
- id: no-commit-to-branch
name: Checking for commit to protected branch
language: system
entry: poetry run no-commit-to-branch
pass_filenames: false
always_run: true
args:
- --branch=dev
- --branch=main