-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Currently, if dependencies (e.g. goimports
or gofumpt
) are missing, the hooks do not report valid error code to pre-commit
and it fails silently, which is only detected if --verbose
is passed.
> pre-commit run --all-files --show-diff-on-failure --verbose
...
go import/fmt............................................................Passed
- hook id: go-fmt-import
- duration: 0s
/home/vsts/work/1/pre-commit-cache/repok815yl26/run-go-fmt-import.sh: 3: goimports: not found
/home/vsts/work/1/pre-commit-cache/repok815yl26/run-go-fmt-import.sh: 3: goimports: not found
gofumpt..................................................................Passed
- hook id: gofumpt
- duration: 0s
/home/vsts/work/1/pre-commit-cache/repok815yl26/run-go-gofumpt.sh: 3: gofumpt: not found
/home/vsts/work/1/pre-commit-cache/repok815yl26/run-go-gofumpt.sh: 3: gofumpt: not found
As you can see, pre-commit
reports Passed
although the hook failed.
Metadata
Metadata
Assignees
Labels
No labels