-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (65 loc) · 2 KB
/
.pre-commit-config.yaml
File metadata and controls
65 lines (65 loc) · 2 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
exclude: ^src/freenove_esp32/chip/lib
args: ["-l", "100", "--target-version=py310"]
- repo: https://github.com/pycqa/flake8
rev: "5.0.4"
hooks:
- id: flake8 # C90,E,F,W
exclude: ^src/freenove_esp32/chip/lib
additional_dependencies:
- darglint==1.8.1 # DAR
- flake8-annotations==2.9.1 # ANN
- flake8-bugbear==22.10.27 # B,B9
- flake8-cognitive-complexity==0.1.0 # CCR
- flake8-comprehensions==3.10.1 # C4
- flake8-docstrings==1.6.0 # D
- flake8-eradicate==1.4.0 # E800
- flake8-polyfill==1.0.2
- flake8-pytest-style==1.6.0 # PT
- pep8-naming==0.13.2 # N8
- repo: local
hooks:
- id: poetry_lock_check
name: Check if poetry lock file 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_venv
additional_dependencies:
- poetry
verbose: True
files: pyproject.toml
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.1.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies:
- '@commitlint/config-conventional'
- '@commitlint/ensure'
- 'commitlint-plugin-function-rules'