cargo-commitlint

A Rust-based commit message linter following the Conventional Commits specification

🚀 Fast & Native

Built entirely in Rust for maximum performance. No Node.js runtime required.

⚙️ Configurable

Configure via TOML files with sensible defaults. Supports all Conventional Commit types.

🔗 Git Integration

Automatic git hook installation via the build script, or install it by hand.

Features

  • ✅ Validates commit messages against Conventional Commits specification
  • ✅ Configurable via TOML (similar to commitlint)
  • ✅ Git hook installation, with a build script for dev-dependency use
  • ✅ Supports all standard Conventional Commit types
  • ✅ Customizable rules for type, scope, subject, body, and footer
  • ✅ Regex-based commit message parsing
  • ✅ Ignore patterns for skipping validation

Quick Start

# Install (from crates.io when published)
cargo install cargo-commitlint

# Or install from source
git clone https://github.com/quinnjr/cargo-commitlint.git
cd cargo-commitlint
cargo install --path .

# Use as a cargo subcommand
cargo commitlint --help

# Install git hook
cargo commitlint install

# Validate a commit message
cargo commitlint check --message "feat: add new feature"