Closed davidicus closed 4 years ago
I'm not sure there's anything we can do here. The pre-commit
hook is always ran before the commit-msg
hook. There's no option to reconfigure this. githooks docs
We already run linting before testing in our pre-commit hook: https://github.com/IBM/carbon-addons-iot-react/blob/c6a7f379625972d2128008922383462428e69d75/package.json#L50-L53
If the tests pass but your commit message is too long, you can press the up arrow to retrieve your most recently issued command and add --no-verify
to the end, which will skip checks.
git commit -m "this msg is invalid. I can still commit with no verify" --no-verify
This is what I do (I opened this issue after hearing other's frustrations). But it may be dangerous to encourage --no-verify
flags to developers who may just use this as a means to never run checks. Not sure if that is a real problem because test will fail and it wont be able to merge but if there is ever times when we are watching build minutes and cost this could be an issue.
This functionality is currently implemented.
Run commit validator before we do any other checks. Is annoying to have to go through our entire test and linting only to be told our commit is wrong and must submit again, making all test and linting to run again.
We should also run linting first as test is the longest process.