Validate Commit Message
David Ortner edited this page Jan 29, 2024
·
2 revisions
Validates the message inside a Git commit file.
This is useful in combination with a tool like Husky.
Basic Usage
happy-validate-commit-message --commitFile={commitFile}
With Husky
- Install Husky
- Create the file ".husky/commit-msg"
- Add the following to the file ".husky/commit-msg":
#!/bin/sh . "$(dirname "$0")/_/husky.sh" ./node_modules/.bin/happy-validate-commit-message --commitFile=$1