But I don't see any harm in having this either. Particularly for the "last-minute changes". Human errors are always possible, so why not put some checks.
We use pre-commit hook at work to run tests before committing and we also run tests in GitHub actions on any PR to prevent human error. It's been working great for now.
The hook could also be used to lint commit messages if the company or project uses some automated changelog generator or some committing standard.
Smaller commits, and unit testing the code will not let syntax errors at the first place. And hence you won't need that pre-commit.
Agreed. That's the right way to do.
But I don't see any harm in having this either. Particularly for the "last-minute changes". Human errors are always possible, so why not put some checks.
To err is human; to automate, divine
We use pre-commit hook at work to run tests before committing and we also run tests in GitHub actions on any PR to prevent human error. It's been working great for now.
The hook could also be used to lint commit messages if the company or project uses some automated changelog generator or some committing standard.
Thanks for adding this mate. I will make this hook, lint commit messages as well.