Skip to content

Commit f4fe554

Browse files
committed
chore: update pre-commit hook to skip Spotless check if no changes in src/
1 parent f1c66b7 commit f4fe554

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.githooks/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# git config core.hooksPath .githooks
66
#
77

8+
# Only run Spotless if staged changes include files under src/
9+
if ! git diff --cached --name-only | grep -q '^src/'; then
10+
echo "No changes in src/, skipping Spotless check."
11+
exit 0
12+
fi
13+
814
echo "Running Spotless check..."
915

1016
# Run spotless check

0 commit comments

Comments
 (0)