-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
75 lines (71 loc) · 2.15 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
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: detect-private-key
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.6.1
hooks:
- id: cspell
name: Spell check readme
files: "README.md"
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.13.0
hooks:
- id: commitlint
name: Lint commit message
entry: commitlint -e -s
stages: [commit-msg]
additional_dependencies:
- "@commitlint/config-conventional"
- id: commitlint
name: Lint commit message from file in $COMMIT_MSG_FILE
entry: commitlint -E COMMIT_MSG_FILE -s
stages: [manual]
additional_dependencies:
- "@commitlint/config-conventional"
- repo: local
hooks:
- id: build
name: Build dist
language: system
entry: poetry run scripts/build_dist.py
files: "src/.*"
pass_filenames: false
- id: format
name: Format Python files
language: system
entry: poetry run ruff format
types: [python]
exclude: "dist/pyseed.py|src/data/test_doctests\\.template\\.py"
- id: lint
name: Lint Python files
language: system
entry: poetry run ruff check
types: [python]
pass_filenames: false
exclude: "dist/pyseed.py"
- id: mypy
name: Type check Python files
entry: poetry run mypy src tests
language: system
types: [python]
pass_filenames: false
exclude: "dist/pyseed.py"
- id: test
name: Run unit tests
language: system
entry: sh -c "PYSEED_TEST_CREATE_PROJECT=1 python3 -m unittest"
types: [python]
exclude: "scripts/.*\\.py"
pass_filenames: false