-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
67 lines (67 loc) · 2.02 KB
/
.pre-commit-hooks.yaml
File metadata and controls
67 lines (67 loc) · 2.02 KB
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
- id: git-prevent-commit-on-default
name: Prevent a commit on the default branch
description: |
Prevent a commit on the default branch
A Pull Request should be used
entry: dev-scripts/git-hooks/git-prevent-commit-on-default
language: script
pass_filenames: false
always_run: true
stages: [ pre-commit ]
minimum_pre_commit_version: 3.2.0
- id: git-prevent-out-of-sync-commit
name: Prevent a commit on a out-of-sync branch
description: |
Prevent a commit on a out-of-sync branch
A pull should be done first
entry: dev-scripts/git-hooks/git-prevent-out-of-sync-commit
language: script
pass_filenames: false
always_run: true
stages: [ pre-commit ]
minimum_pre_commit_version: 3.2.0
- id: git-fetch
name: git fetch
description: |
Fetch the latest changes from remote
entry: dev-scripts/git-hooks/git-fetch
language: script
pass_filenames: false
always_run: true
stages: [ pre-commit ]
- id: maven-check-pom-xml
name: check maven pom
description: |
Check a maven pom file
entry: dev-scripts/git-hooks/maven-check-pom-xml
language: script
pass_filenames: false
files: 'pom\.xml'
stages: [ pre-commit ]
- id: javadoc-check
name: check javadoc comments
description: |
A hook to check javadoc comment block
entry: dev-scripts/git-hooks/javadoc-check
language: script
pass_filenames: true
files: '\.java$'
stages: [ pre-commit ]
- id: maven-install
name: Install artifacts in the local repo
description: |
Install artifacts in the local repo by running maven install
entry: dev-scripts/git-hooks/maven-install
language: script
# always_run = true is mandatory
# as post commit does not filter on file names
# https://pre-commit.com/#post-commit
always_run: true
stages: [ post-commit ]
# does not work with a Intellij running instance
#- id: idea-format
# name: IntelliJ IDEA Code Formatter
# entry: dev-scripts/git-hooks/idea-format
# language: script
# pass_filenames: true
# description: Format code using IntelliJ IDEA's formatter if present