-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
138 lines (121 loc) · 3.85 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
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2023 Univention GmbH
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v4.4.0"
hooks:
# "check for added large files"
- id: "check-added-large-files"
# "check for merge conflicts"
- id: "check-merge-conflict"
# "check yaml"
- id: "check-yaml"
args:
- "--allow-multiple-documents"
exclude: "^helm/.+/(templates|data-files)/"
# "fix end of files"
- id: "end-of-file-fixer"
exclude: "^helm/.+/(README.md|.*.svg)"
# "fix python encoding pragma"
- id: "fix-encoding-pragma"
args:
- "--remove"
# "trim trailing whitespace"
- id: "trailing-whitespace"
- repo: "https://git.knut.univention.de/univention/dist/pre-commit-ucr"
rev: "0.0.9"
hooks:
# "flake8 --select E1,E2 for UCR templates"
- id: "ucr-flake8"
# "ruff for UCR templates"
- id: "ucr-ruff"
# "autopep8 --select E1,E2 for UCR templates"
- id: "ucr-autopep8"
stages: ["manual"]
# "ruff --fix for UCR templates"
- id: "ucr-ruff-fix"
stages: ["manual"]
- repo: "https://github.com/compilerla/conventional-pre-commit"
rev: "v2.1.1"
hooks:
- id: "conventional-pre-commit"
stages: ["commit-msg"]
- repo: "https://git.knut.univention.de/univention/dist/pre-commit-debian.git"
rev: "v1.1.0"
hooks:
# "Debian control file formatter"
- id: "debian-control"
# "Python linter"
- repo: "https://github.com/astral-sh/ruff-pre-commit"
rev: "v0.0.275"
hooks:
- id: "ruff"
args:
- "--fix"
- "--exit-non-zero-on-fix"
- "--extend-select"
- "COM"
# "Python formatter"
- repo: "https://github.com/psf/black"
rev: "23.3.0"
hooks:
- id: "black"
# This is a wrapper for shellcheck as long as
# shellcheck doesn't have it's own .pre-commit-hooks.yaml
# https://github.com/koalaman/shellcheck/pull/1032
- repo: "https://gitlab.com/univention/pre-commit-hooks/pre-commit-shell"
rev: "v1.0.6"
hooks:
# "Shell Syntax Check"
- id: "shell-lint"
# "docker-compose.yaml linter"
- repo: "https://gitlab.com/univention/pre-commit-hooks/docker-compose-check"
rev: "7702a8801a158b8595569dd29e2dd655d8a08310"
hooks:
# "Validate docker-compose files"
- id: "docker-compose-check"
# "Dockerfile linter"
- repo: "https://gitlab.com/univention/pre-commit-hooks/docker-pre-commit"
rev: "v2.0.0"
hooks:
# "Lint Dockerfiles"
- id: "hadolint-system"
args:
- "--ignore=DL3008"
# "Helm chart linter"
- repo: "https://github.com/gruntwork-io/pre-commit"
rev: "v0.1.21"
hooks:
- id: "helmlint"
# "Helm docs linter"
- repo: "https://github.com/norwoodj/helm-docs"
rev: "v1.11.0"
hooks:
- id: "helm-docs"
args:
- "--chart-search-root=helm"
- "--template-files=README.md.gotmpl"
always_run: true
- repo: "https://git.knut.univention.de/univention/dist/pre-commit-hooks/addlicense"
rev: "v1.0.1"
hooks:
- id: "addlicense"
name: "Check or add license headers to files"
# Disable temporarily because gitlab-api can not be accessed.
# "urllib.error.HTTPError: HTTP Error 401: Unauthorized"
# - repo: "https://gitlab.com/univention/pre-commit-hooks/gitlab-ci-linter"
# rev: "v1.0.1"
# hooks:
# # ".gitlab-ci.yml linter"
# - id: "gitlab-ci-linter"
# args:
# - "--server"
# - "https://git.knut.univention.de"
- repo: "https://git.knut.univention.de/univention/customers/dataport/upx/kyverno-test-pre-commit"
rev: "v0.2.0"
hooks:
- id: "kyverno-test"
...