Skip to content

Commit 089f1e2

Browse files
committed
update pre-commit linter hook to run on entire repo
- running on each file isn't as comprehensive as running against the entire repo. See this [issue](golangci/golangci-lint#1574)
1 parent 19f02b2 commit 089f1e2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.githooks/pre-commit

+3-6
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ fi
1515

1616
PASS=true
1717

18-
for FILE in $STAGED_GO_FILES
19-
do
20-
golangci-lint run $FILE
21-
if [[ $? == 1 ]]; then
18+
golangci-lint run
19+
if [[ $? == 1 ]]; then
2220
PASS=false
23-
fi
24-
done
21+
fi
2522

2623
if ! $PASS; then
2724
printf "COMMIT FAILED\n"

0 commit comments

Comments
 (0)