atypical-commit 0.1.1

(Non)-standard enforcing DX
Documentation

Atypical

(Non)-standard enforcing DX

CI codecov crates.io docs.rs

commit-lint

Lints the commit message header against <keyword>[<modifier>][(<scope>)][<reason>]: <description>, e.g. add(exe)[int]: initial commit linting.

Install

cargo install --path crates/atypical-commit

Usage

Pass a commit message file, or - to read from stdin:

commit-lint -- .git/COMMIT_EDITMSG
echo 'add(lib)[int]: something' | commit-lint -

Exit codes: 0 valid, 1 failed linting (or unreadable input), 2 usage error or nothing to lint.

As a commit-msg hook

With husky, in .husky/commit-msg:

commit-lint -- "$1"

Or as a plain git hook, in .git/hooks/commit-msg (mark it executable):

#!/bin/sh
commit-lint -- "$1"

License

This project is licensed under either of:

at your option.