Skip to content

Commit

Permalink
update pre-commit linter hook to run on entire repo
Browse files Browse the repository at this point in the history
- running on each file isn't as comprehensive as running against the entire repo. See this [issue](golangci/golangci-lint#1574)
  • Loading branch information
sudeepdino008 committed Mar 29, 2022
1 parent 19f02b2 commit 089f1e2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .githooks/pre-commit
Expand Up @@ -15,13 +15,10 @@ fi

PASS=true

for FILE in $STAGED_GO_FILES
do
golangci-lint run $FILE
if [[ $? == 1 ]]; then
golangci-lint run
if [[ $? == 1 ]]; then
PASS=false
fi
done
fi

if ! $PASS; then
printf "COMMIT FAILED\n"
Expand Down

0 comments on commit 089f1e2

Please sign in to comment.