-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 1.38 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 loc) · 1.38 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
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
repos:
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^(\.git|target)/
- id: end-of-file-fixer
exclude: ^(\.git|target)/
- id: check-yaml
- id: check-xml
- id: check-added-large-files
args: ['--maxkb=500']
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
# Local hooks for Java
- repo: local
hooks:
# Spotless formatting check
- id: spotless-check
name: Spotless Format Check
entry: mvn spotless:check -B -q
language: system
types: [java]
pass_filenames: false
# Maven compile check
- id: maven-compile
name: Maven Compile
entry: mvn compile -B -q
language: system
types: [java]
pass_filenames: false
# Maven test
- id: maven-test
name: Maven Test
entry: mvn test -B -q
language: system
types: [java]
pass_filenames: false
stages: [pre-push]
# File size check
- id: file-size-check
name: File Size Check
entry: node scripts/check-file-size.mjs
language: system
types: [java]
pass_filenames: false