hk util check-conventional-commit
- Usage:
hk util check-conventional-commit [--allowed-types <ALLOWED_TYPES>] <COMMIT_MSG_FILE> - Effect: read-only
Check that a commit message follows the Conventional Commits format
Titles starting with fixup! , squash! , or amend! (temporary commits created for git rebase --autosquash) skip validation.
Arguments
<COMMIT_MSG_FILE>— Commit message file to check
Flags
--allowed-types <ALLOWED_TYPES>— Comma-separated list of commit types to acceptDefault:
build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test-h --help— Print help
Examples
Validate a file containing a commit message.
sh
hk util check-conventional-commit .git/COMMIT_EDITMSGLearn more
Built-in linters and utilities · Troubleshooting · All commands
