-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
64 lines (63 loc) · 1.87 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
# See https://pre-commit.com/ for usage and config
fail_fast: true
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-toml
- id: end-of-file-fixer
exclude: ".srt$"
- id: trailing-whitespace
exclude: ".srt$|.gresource.xml$"
- id: mixed-line-ending
- repo: local
hooks:
- id: glib
name: glib-compile-resources
entry: glib-compile-resources --sourcedir=resources --target=myhumbleself/resources/myhumbleself.gresource resources/myhumbleself.gresource.xml
language: system
pass_filenames: false
- id: ruff-check
name: ruff check
stages: [commit]
language: system
entry: ruff check --fix .
pass_filenames: false
- id: ruff-format
name: ruff format
stages: [commit]
language: system
entry: ruff format .
pass_filenames: false
- id: mypy
name: mypy
stages: [commit]
language: system
entry: mypy
pass_filenames: false
- id: pytest
name: pytest
stages: [commit]
language: system
entry: pytest
pass_filenames: false
# To execute manual stage:
# pre-commit run --hook-stage manual
- id: pydeps
name: pydeps
stages: [manual]
language: system
entry: pydeps myhumbleself --max-bacon=2 -o=pydeps.png -T=png --no-show
pass_filenames: false
- id: code2flow
name: code2flow
stages: [manual]
language: system
entry: code2flow myhumbleself --no-trimming --exclude-function=(global) --output=code2flow.png
pass_filenames: false