forked from elexis/elexis-3-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
30 lines (30 loc) · 995 Bytes
/
.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
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-json
files: '.*json'
- id: check-xml
files: '.*xml'
- id: check-yaml
files: '.*yaml|.*yml'
- id: mixed-line-ending
files: '.*java'
args: ['--fix=lf']
# Using file-contents-sorter for the properties managed by the RBE
# (Resource Bundle Editor) is a bad ide as the RBE always inserts an empty
# line between to ids
# - id: file-contents-sorter
# files: 'plugin.*properties|messages.*properties' # but not build.properties
- repo: local
hooks:
- id: enforce-eclipse-format
# use it locally by calling
# pre-commit run --hook-stage manual enforce-eclipse-format --show-diff-on-failure --verbose --all-files
stages: [manual]
name: enforce-eclipse-format
entry: mvn -V formatter:format --fail-at-end
language: system
types: [java]
pass_filenames: false