https://github.com/welpo/git-sumi
The non-opinionated Rust-based commit message linter.
https://github.com/welpo/git-sumi
cli commit-messages conventional-commits conventional-commits-parser conventions git lint linter non-opinionated rust rust-cli
Last synced: 2 months ago
JSON representation
The non-opinionated Rust-based commit message linter.
- Host: GitHub
- URL: https://github.com/welpo/git-sumi
- Owner: welpo
- License: apache-2.0
- Created: 2024-02-04T15:23:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T18:30:38.000Z (about 1 year ago)
- Last Synced: 2024-10-16T23:37:55.968Z (about 1 year ago)
- Topics: cli, commit-messages, conventional-commits, conventional-commits-parser, conventions, git, lint, linter, non-opinionated, rust, rust-cli
- Language: Rust
- Homepage: https://sumi.rs/
- Size: 9.07 MB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Documentation |
Website
git-sumi
The non-opinionated Rust-based commit message linter
> sumi (墨, /sɯmi/): ink, especially the type used in [traditional ink wash painting](https://en.wikipedia.org/wiki/Ink_wash_painting).
## 🎥 Demo
See how git-**sumi** can help you write better commit messages:
https://github.com/welpo/git-sumi/assets/6399341/cf1b4f00-3f79-454f-a533-5b36812dd464
## ✨ Main features
- **Customizable rules**: Configure rules to enforce [Conventional Commits](https://www.conventionalcommits.org/), length limits, [Gitmoji](https://gitmoji.dev/) usage, and [more](https://sumi.rs/docs/rules).
- **Clear error reporting**: Provides detailed error reporting, making fixing commit messages straightforward and educational.
- **Seamless integration**: As a single binary, git-sumi easily integrates into your existing workflow with minimal setup. You can even use the [GitHub Action](https://github.com/welpo/git-sumi-action) to lint your commits (or PR titles) without installing anything.
## 🚀 Quick start
Install git-sumi:
```bash
# From cargo.
cargo install git-sumi
# From pip.
uv tool install git-sumi
pipx install git-sumi
pip install git-sumi
# Chocolatey (Windows).
choco install git-sumi
```
Create a base `sumi.toml` configuration file in your repository:
```bash
git sumi --init
```
Edit `sumi.toml` with your project's rules:
```toml
# Rule: Use the imperative mood in the description.
# Example: 'Fix bug' instead of 'Fixed bug'.
imperative = true
# Rule: Body line length limit.
# A value of 0 disables the rule.
max_body_length = 74
# Rule: No leading, trailing, or consecutive spaces.
whitespace = true
```
Set up automatic commit message validation:
```bash
git sumi --init commit-msg
```
Before each commit, git-sumi will lint your commit message. If it doesn't meet your project's rules, you'll see an error message and the commit will be aborted.
## 📝 Documentation
Learn how to use git-**sumi** from the [documentation](https://sumi.rs/docs).
- [Quick setup](https://sumi.rs/docs/#quickstart)
- [Configuration](https://sumi.rs/docs/configuration)
- [Rules](https://sumi.rs/docs/rules)
- [Examples](https://sumi.rs/docs/examples)
- [Integration](https://sumi.rs/docs/integration)
- [Frequently Asked Questions](https://sumi.rs/docs/faq)
## 👥 Contributing
Please do! Contributions are always welcome. We appreciate improvements to the documentation, development of new rules, code cleanup, resolving issues, requesting or developing new functionality…
Take a look at our [Contributing Guidelines](/CONTRIBUTING.md) for more information on how to get started.
## 📄 License
This project is licensed under the terms of both the [MIT license](/LICENSE-MIT) and the [Apache License (Version 2.0)](/LICENSE-APACHE), at your option.