forked from TencentBlueKing/bk-user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
38 lines (38 loc) · 1.22 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
repos:
- repo: local
hooks:
- id: Name check
name: Check sensitive info
verbose: true
language: system
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/rtx.sh $@; fi"
- id: IP check
name: Check sensitive info
verbose: true
language: system
exclude: "^(.*/poetry.lock|.*/requirements.txt)|src/login/locale/en/LC_MESSAGES/django.po|src/login/bklogin/templates/account/agreement.part"
entry: bash -c "if [[ -d pre_commit_hooks ]]; then pre_commit_hooks/ip.sh $@; fi"
- id: isort
name: isort
language: python
types: [python]
pass_filenames: false
entry: isort --settings-path=pyproject.toml src
- id: black
name: black
language: python
types: [python]
pass_filenames: false
entry: black --config=pyproject.toml src
- id: flake8
name: flak8
language: python
types: [python]
pass_filenames: false
entry: pflake8 --config=pyproject.toml src
- id: mypy
name: mypy
language: python
types: [python]
pass_filenames: false
entry: mypy src/ --config-file=pyproject.toml