forked from gipo999/tomcat-webapp-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (71 loc) · 2.16 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: d0293ebc40f6c0606d624ee4c638c7597f8044d2 # pragma: allowlist secret
hooks:
- id: trailing-whitespace
stages: [commit]
- id: check-yaml
stages: [commit]
- id: check-xml
stages: [commit]
- id: check-toml
stages: [commit]
- id: check-json
stages: [commit]
- id: end-of-file-fixer
stages: [commit]
- id: check-added-large-files
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: check-illegal-windows-names
stages: [commit]
- id: check-executables-have-shebangs
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-shebang-scripts-are-executable
stages: [commit]
- id: detect-private-key
stages: [commit]
# gitguardian requires API key
# - repo: https://github.com/gitguardian/ggshield
# rev: v1.28.0
# hooks:
# - id: ggshield
# language_version: python3
# stages: [commit]
- repo: https://github.com/gitleaks/gitleaks
rev: 79cac73f7267f4a48f4bc73db11e105a6098a836 # pragma: allowlist secret
hooks:
- id: gitleaks
stages: [commit]
- repo: https://github.com/Yelp/detect-secrets
rev: 52759b86b8e311a8ba0e8d464001b1bf353f54f8 # pragma: allowlist secret
hooks:
- id: detect-secrets
stages: [commit]
args: ["--baseline", ".secrets.baseline"]
exclude: package.lock.json
#
# TODO: make sure the war executes the check and lint?
# or put it in the test stage? since we hot reload the war
- repo: local
hooks:
- id: commit-lint
name: commit-lint
entry: npm run commitlint
language: system
stages: [commit-msg]
- id: gradle-check
name: gradle-check
entry: node scripts/gradlew.cjs --lint
pass_filenames: false
language: system
stages: [commit]
- id: gradle-check-build
name: gradle-check-build
entry: node scripts/gradlew.cjs --build
pass_filenames: false
language: system
stages: [push]