nebbles / gitcommit

a tool for writing conventional commits, conveniently
GNU General Public License v3.0
14 stars 2 forks source link

Pre-commit blocks commit yet success message shown #36

Closed nebbles closed 4 years ago

nebbles commented 4 years ago

Even when pre-commit hooks reject the commit, a success message is shown to the user

nebbles commented 4 years ago

Perhaps pre-commit run --all-files could be run before the commit starts if .pre-commit-config.yaml is detected to ensure that the checks pass before writing commit message? Is there any configuration that would differ between this command and what git commit would have run?

nebbles commented 4 years ago

Perhaps worth adding a shortcut command to check files?

nebbles commented 4 years ago

24 will probably mitigate the need to run pre-commit hooks before writing the message. This would've been bad practice anyway, since the commit msg itself will likely need to be linted by a hook.