Skip to content

Commit

Permalink
👷 git pre-commit 使用 mvn validate 同时校验格式和checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Hccake committed Jan 20, 2024
1 parent 7375115 commit 182f9f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .etc/git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/sh
source ~/.bash_profile

# 在提交前进行校验
mvn spring-javaformat:validate
mvn validate

# 检查 mvn validate 的退出状态
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 182f9f2

Please sign in to comment.