-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
81 lines (74 loc) · 1.77 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
76
77
78
79
80
81
exclude: |
(?x)(
^build/|
^extern/|
^doc/|
^src/service.in/|
^src/environment.in/|
^src/karabind/stubs|
^ci/
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-json
- id: destroyed-symlinks
- id: check-symlinks
- id: check-xml
- id: pretty-format-json
args: [ --autofix ]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.2
hooks:
- id: clang-format
entry: |
bash -c '
if [ -n "${CI_JOB_ID}" ]; then
clang-format --Werror -i -style=file --dry-run "$@"
else
clang-format --Werror -i -style=file "$@"
fi
'
files: |
(?x)(
^src/karabo/|
^src/karabind/|
^src/integrationTests/|
^src/brokerMessageLogger/|
^src/cppLongTests/|
^src/templates/cpp/|
^src/deviceServer/
)
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.1
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
name: isort pythonKarabo
files: |
(?x)(
^src/pythonKarabo/
)
- id: isort
name: isort pythonGui
files: |
(?x)(
^src/pythonGui/
)
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [ --py311-plus ]