Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Latest commit

 

History

History
 
 

docs

commitlint

Dart version commitlint - A tool to lint commit messages.

Getting started

commitlint helps your team adhere to a commit convention. By supporting pub-installed configurations it makes sharing of commit conventions easy.

Install

# Install commitlint_cli and upstream configure if needed
dart pub add --dev commitlint_cli commitlint_config

Configuration

# Configure commitlint to use upstream config
echo "include: package:commitlint_config/commitlint.yaml" > commitlint.yaml

Test

# 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.

Documentation

  • 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