Skip to content

Commit f4ee58b

Browse files
committed
Add Checkstyle pre-commit hook for Java code quality
1 parent ab73e82 commit f4ee58b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ repos:
6262
true # Ensures this hook runs even if no Java files are changed.
6363
# This is useful for spotless:apply which might affect files not staged.
6464
stages: [manual]
65+
- id: checkstyle
66+
name: run checkstyle
67+
description: check Java code style with Checkstyle
68+
entry: mvn checkstyle:check
69+
language: system
70+
types: [java]
71+
pass_filenames: false
72+
always_run: true
73+
stages: [pre-commit]
6574
- id: check-zip-file-is-not-committed
6675
name: check no zip files are committed
6776
description: Zip files are not allowed in the repository

0 commit comments

Comments
 (0)