-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
89 lines (84 loc) · 2.39 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
default_install_hook_types: [pre-commit, commit-msg, pre-push]
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
args: ["--pytest-test-first"]
- id: trailing-whitespace
- repo: https://github.com/zricethezav/gitleaks
rev: v8.17.0
hooks:
- id: gitleaks
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.5.2
hooks:
- id: commitizen
- id: commitizen-branch
args: [--rev-range, HEAD]
stages: [push]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.13
hooks:
- id: validate-pyproject
- repo: local
hooks:
- id: format
name: Format (python)
entry: tox -e format
files: "^(src|tests)"
pass_filenames: false
types_or: [python]
language: python
additional_dependencies: ["tox~=4.6"]
- id: lint
name: Lint (python)
entry: tox -e lint
files: "^(src|tests)"
pass_filenames: false
types_or: [python]
language: python
additional_dependencies: ["tox~=4.6"]
- id: test
name: Test (python)
entry: tox
always_run: true
pass_filenames: false
language: python
additional_dependencies: ["tox~=4.6"]
stages: [push]
- id: security
name: Security check on dependencies (python)
entry: tox -e security
always_run: true
pass_filenames: false
language: python
additional_dependencies: ["tox~=4.6"]
stages: [push]
- id: docs
name: Generate docs (python)
entry: tox -e docs
always_run: true
pass_filenames: false
language: python
additional_dependencies: ["tox~=4.6"]
stages: [push]