-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
70 lines (61 loc) · 1.82 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
# SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
#
# SPDX-License-Identifier: AGPL-3.0-only
exclude: "mvnw|package-lock.json|go.sum"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
args: [--maxkb=2048]
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.23
hooks:
- id: shellcheck
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v3.0.1
hooks:
- id: docker-compose-check
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
hooks:
- id: reuse
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
hooks:
- id: pretty-format-java
args: []
- repo: https://github.com/ejba/pre-commit-maven
rev: v0.3.4
hooks:
- id: maven
args: [ 'compile' ]
- repo: local
hooks:
- id: check-if-version-is-snapshot
name: check-if-version-is-snapshot
entry: bash -c '
currentBranch=$(git branch --show-current)
isSnapshot=$(grep -re "pkgrel=\"SNAPSHOT\"" package/PKGBUILD)
if [[ "$currentBranch" != *"release"* && -z "$isSnapshot" ]] ||
[[ "$currentBranch" == *"release"* && -n "$isSnapshot" ]];
then
exit 1;
fi'
language: system