forked from univention/univention-corporate-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
149 lines (149 loc) · 5.41 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "^packaging/ucslint/testframework/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/
"
repos:
- repo: https://git.knut.univention.de/univention/dist/pre-commit-ucr
rev: '0.0.9'
hooks:
- id: ucr-flake8
additional_dependencies: ["flake8==5.0.4"]
- id: ucr-ruff
additional_dependencies: ["ruff==0.0.274"]
- id: ucr-autopep8
additional_dependencies: ["autopep8<=2.0.2"]
stages: [ manual ]
- id: ucr-ruff-fix
additional_dependencies: ["ruff==0.0.274"]
stages: [ manual ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-json
exclude: "/conffiles/.*[.]json$"
- id: check-xml
exclude: "/conffiles/.*[.]xml$\
|^base/univention-app-appliance/\
"
- id: check-yaml
exclude: "/conffiles/.*[.]yaml$"
- id: check-merge-conflict
- id: pretty-format-json
exclude: "/conffiles/.*[.]json$\
"
args:
- --autofix
- --no-ensure-ascii
- id: trailing-whitespace
exclude: "^base/univention-config-registry/tests/unwrap/\
|^base/univention-lib/unittests/fstab$\
|^base/univention-system-setup/city-data/.*[.](txt|json)$\
|^doc/errata/staging/0.*template[.]yaml$\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|[.]ai$\
|[.]csv$\
|[.]diff$\
|[.]patch$\
|[.]svg$\
"
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa
- id: python-no-eval
exclude: "^management/univention-directory-manager-modules/modules/univention/admin/__init__.py\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^test/ucs-test/tests/10_ldap/52listener-filter.py\
|^packaging/univention-l10n/univention/l10n/umc.py"
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pycqa/flake8
rev: '5.0.4'
hooks:
- id: flake8
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- repo: https://git.knut.univention.de/univention/dist/pre-commit-debian.git
rev: v1.1.0
hooks:
- id: debian-control
- id: debian-changelog
- repo: https://git.knut.univention.de/univention/dist/pre-commit-ucs.git
rev: v1.4.0
hooks:
- id: ucs-erratum
- id: missing-executable-flag-for-python-file
- id: missing-executable-flag-for-shell-file
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.274'
hooks:
- id: ruff
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- id: ruff
alias: "ruff-fix"
stages: [ manual ]
args: ["--fix"]
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- id: ruff
alias: "ruff-statistics"
stages: [ manual ]
args: ["--statistics"]
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^packaging/ucslint/testframework/\
"
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
entry: isort -c
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- id: isort
alias: "isort-fix"
stages: [ manual ]
entry: isort
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
hooks:
- id: autopep8
args: ["-d"]
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"
- id: autopep8
alias: "autopep8-fix"
stages: [ manual ]
args: ["-i"]
exclude: "^oidc/python-keycloak/\
|^services/univention-ldb-modules/buildtools/\
|^services/univention-ldb-modules/third_party/\
|^packaging/ucslint/testframework/\
"