-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
76 lines (68 loc) · 1.99 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
default_language_version:
python: python3.11
repos:
# basic hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^charts/templates/
args:
- --allow-multiple-documents
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]
# security linter on
- repo: https://github.com/pycqa/bandit
rev: 1.7.9
hooks:
- id: bandit
name: check security by Bandit
args: [ '-iii', '-ll' ]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.6.5'
hooks:
- id: ruff
name: lint by Ruff
args: [ --fix, --exit-non-zero-on-fix ]
# uncompromise python formatter
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
name: format by black
exclude: ^.*\b(migrations)\b.*$
- repo: https://github.com/Riverside-Healthcare/djlint
rev: 'v1.35.2' # replace with the latest tag on GitHub
hooks:
- id: djlint-django
entry: djlint --reformat
- repo: https://github.com/ecugol/pre-commit-hooks-django
rev: v0.4.0 # Use the ref you want to point at
hooks:
- id: check-untracked-migrations
name: check no untracked migration
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
autofix_prs: false
autoupdate_branch: develop
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip:
- check-untracked-migrations # no git there on CI
submodules: false