-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.pre-commit-config.yaml
132 lines (116 loc) · 3.74 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
# yamllint disable-line rule:line-length
# SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
default_install_hook_types:
- pre-commit
repos:
- repo: local
hooks:
- id: unicode-lint
name: unicode-lint
entry: scripts/unicode-lint.sh
language: script
pass_filenames: true
description: Prohibit Unicode
stages: [commit]
- id: spell-lint
name: spell-lint
entry: scripts/spell-lint.sh
language: script
pass_filenames: true
description: Spellcheck files
stages: [commit]
- id: shell-lint
name: shell-lint
entry: scripts/shell-lint.sh
language: script
pass_filenames: true
# yamllint disable rule:line-length
files: >-
(\.sh|/rc\.local\.d/.*\.rc|/bin/.*|/rpc/.*|/network-hooks\.d/.*|
/qubes-firewall\.d/.*|/(lib-)?qubes-bind-dirs\.d/.*|
/\.config/(sh|bash|zsh|less|x11|git/shell|git/template/hooks)/.*|
/autostart-scripts/.*|/qvm-copy-dotfiles|/git-core/.*)
# yamllint disable rule:line-length
exclude: >-
\.(policy|asc|txt|top|sls|jinja|toml|vim|py|muttrc|nft|md|spec|
list|sources|repo|socket|timer|service|y(a)?ml)$
description: Lint Shellscripts
stages: [commit]
- id: markdown-lint
name: markdown-lint
entry: scripts/markdown-lint.sh
language: script
pass_filenames: true
files: \.md$
description: Lint Markdown files
stages: [commit]
- id: python-lint
name: python-lint
entry: scripts/python-lint.sh
language: script
pass_filenames: true
files: \.py$
description: Lint Python files
stages: [commit]
- id: salt-lint
name: salt-lint
entry: scripts/salt-lint.sh
language: script
pass_filenames: true
files: (^minion.d/.*.conf|\.(sls|top|jinja|j2|tmpl|tst))$
description: Lint Salt files
stages: [commit]
- id: yaml-lint
name: yaml-lint
entry: scripts/yaml-lint.sh
language: script
pass_filenames: true
files: \.(yaml|yml)$
description: Lint YAML files
stages: [commit]
- id: qubesbuilder-gen
name: qubesbuilder-gen
entry: scripts/qubesbuilder-gen.sh
args: [test]
language: script
pass_filenames: false
files: salt/\S+/README.md
description: Check if .qubesbuilder is up to date
stages: [commit]
# - id: spec-gen
# name: spec-gen
# language: script
# entry: scripts/spec-gen.sh
# args: [test]
# pass_filenames: true
# # yamllint disable rule:line-length
# files: >-
# ^(rpm_spec/template/template.spec|salt/.*|
# scripts/spec-(get|gen)\.sh)$
# description: Check if RPM SPEC files are up to date
# stages: [commit]
- id: license-lint
name: license-lint
entry: reuse
args: [lint]
language: python
pass_filenames: false
description: Lint files to comply with the REUSE Specification
stages: [commit]
- id: copyright-lint
name: copyright-lint
entry: scripts/copyright-lint.sh
language: script
pass_filenames: true
description: Check if copyright information is correct
stages: [commit]
- id: commit-verify
name: commit-verify
entry: scripts/commit-verify.sh
language: script
pass_filenames: false
description: Verify if there is a valid signature associated with the revisions
stages: [push]