-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
59 lines (54 loc) · 1.52 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
default_install_hook_types: [pre-commit,commit-msg, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict # No merge conflict markers
name: No merge conflict markers
stages: [commit]
- id: mixed-line-ending # No mix of \n and \r\n
name: No mixed line endings (LF and CRLF)
stages: [commit]
- id: no-commit-to-branch
name: Not committing to main
args: [--branch, main]
stages: [commit]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
stages: [commit]
types: [python]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
hooks:
- id: ruff
args: [--fix]
stages: [commit]
types: [python]
- repo: local
hooks:
- id: mypy-all
name: MyPy (all)
pass_filenames: false
files: lakera_chainguard/
entry: poetry run mypy .
stages: [push]
language: system
- id: pytest
name: pytest
stages: [push]
language: system
entry: poetry run pytest
types: [python]
pass_filenames: false
verbose: true
# conventional commits
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.6.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
args:
- --types=chore,feat,fix,ci,docs,refactor,revert,test
- --allow-breaking