Dart version commitlint - A tool to lint commit messages. (Inspired by JavaScript commitlint)
commitlint helps your team adhere to a commit convention. By supporting pub-installed configurations it makes sharing of commit conventions easy.
# Install commitlint cli and upstream configure if needed
dart pub add --dev commitlint_cli commitlint_config
# Configure commitlint to use conventional config
echo "include: package:commitlint_config/commitlint.yaml" > commitlint.yaml
# Lint from stdin
echo 'foo: bar' | dart run commitlint_cli
⧗ input: type: add docs
✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] type-enum
✖ found 1 errors, 0 warnings
# Lint last commit from history
commitlint --from=HEAD~1
?> To get the most out of commitlint
you'll want to automate it in your project lifecycle. See our Setup guide for next steps.
Project | Status | Description |
---|---|---|
commitlint_cli | commitlint command-line tool entry | |
commitlint_config | commitlint rules configuration, can be included. | |
commitlint_format | commitlint output formatting package. | |
commitlint_lint | commitlint linting package | |
commitlint_load | load configured rules for commitlint | |
commitlint_read | read commit message for commitlint. | |
commitlint_rules | rules set of commitlint. | |
commitlint_types | types package for commitlint. |
See documention
- Guides - Common use cases explained in a step-by-step pace
- Concepts - Overarching topics important to understand the use of
commitlint
- Reference - Mostly technical documentation