Skip to content

The CommitLint package helps enforce conventional commit message guidelines by validating commit messages against predefined rules, ensuring consistency and clarity in your project's version history.

License

Notifications You must be signed in to change notification settings

LauanGuermandi/CommitLint

Repository files navigation

🚀 CommitLint CLI - Enforce Conventional Commit Messages

CommitLint CLI is a simple yet powerful .NET command-line tool that validates commit messages against the Conventional Commits specification. It ensures commit messages follow a structured format, improving project maintainability, automation, and changelog generation.

✨ Features

  • Automatic Validation – Checks commit messages for compliance with Conventional Commits.
  • 🔧 Customizable & Extensible – Easily integrate into your CI/CD pipeline.
  • 🛠 Git Hooks Support – Works seamlessly with Husky.NET for pre-commit validation.
  • Fast & Lightweight – Built with .NET and optimized for speed.

🚀 Usage

Run the CLI tool with:

CommitLint <commit-message-file>

Example commit messages: ✅ feat(auth): add OAuth support – Valid ✅ feat: add OAuth support – Valid ❌ fixed the bug – Invalid

🔗 Integration with Git Hooks (Husky.NET)

To automatically enforce commit message rules before every commit, use Husky.NET:

dotnet new tool-manifest
dotnet tool install CommitLint
dotnet tool install Husky
dotnet husky add commit-msg -c "CommitLint .git/COMMIT_EDITMSG"

📦 Installation

Install Globally

dotnet tool install --global CommitLint

Install Locally

dotnet tool install --local CommitLint

📜 License

Licensed under the BSD 2-Clause.


Would you like any adjustments? 😊

About

The CommitLint package helps enforce conventional commit message guidelines by validating commit messages against predefined rules, ensuring consistency and clarity in your project's version history.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages