Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 898 Bytes

README.md

File metadata and controls

43 lines (26 loc) · 898 Bytes

commitlint-sh

Lint your commits per conventional commits specification

Use this in post-commit hook and in your pipelines.

Requires:

  • cat
  • grep
  • head
  • mktemp
  • sh

Portable! Works with gnu-coreutils, busybox, toybox.

Usage

commitlint fails with nonzero exit status if the provided commit subject doesn't conform conventionalcommits spec.

# good
echo "fix: some bugz" | commitlint

# bad
echo "malformed" | commitlint
commitlint "malformed"

# example CI usage
git show --no-patch --pretty='format:%s' "${REF:-HEAD}" | commitlint

License

0BSD, see LICENSE.

Similar Projects