Examples
Valid Commit Messages
Valid
feat: add user authenticationValid
feat(api): add new endpointValid
fix: resolve memory leak in parserValid
docs: update README with installation instructionsBreaking Change
feat!: breaking change in APIWith Body
feat: add feature
This is a longer description of the change.
Closes #123Invalid Commit Messages
Invalid
invalid: bad commit typeError: type-enum — 'invalid' is not one of the allowed types
Invalid
Feat: capitalised typeError: type-case — types must be lower-case
Invalid
feat: ends with a period.Error: subject-full-stop — the subject must not end with a period
Conventional Commit Types
Common Types
feat- A new featurefix- A bug fixdocs- Documentation changesstyle- Code style changesrefactor- Code refactoringtest- Test additions/changeschore- Maintenance tasks
Additional Types
perf- Performance improvementsbuild- Build system changesci- CI configuration changesrevert- Reverts a previous commit
CLI Usage Examples
Install Hook
cargo commitlint installValidate Message
cargo commitlint check --message "feat: add feature"Validate from Stdin
echo "feat: add feature" | cargo commitlint checkCustom Config
cargo commitlint check --message "feat: add feature" --config ./custom.toml