https://github.com/aljoshare/commala
🌹 A commit linter with a lot of rice 🍙
https://github.com/aljoshare/commala
commit git golang lint
Last synced: 3 months ago
JSON representation
🌹 A commit linter with a lot of rice 🍙
- Host: GitHub
- URL: https://github.com/aljoshare/commala
- Owner: aljoshare
- License: mit
- Created: 2025-09-15T05:20:58.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-01-26T12:47:25.000Z (5 months ago)
- Last Synced: 2026-01-26T21:36:30.381Z (5 months ago)
- Topics: commit, git, golang, lint
- Language: Go
- Homepage:
- Size: 5.01 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# commala - A commit linter with a lot of rice






[](https://scorecard.dev/viewer/?uri=github.com/aljoshare/commala)
> “Go then, there are other commits than these.”
> — commala, probably
commala is a commit linting tool that ensures that certain standards are met before you merge to keep your git history clean and consistent. commala is part of your Ka-tet, when you walk through the Wastelands of software development.

## Validators
- Author Name: Check if the name of the author is set
- Author Email: Check if the email address of the author is set
- Branch: Check if the branch follows the [conventional branch specification](https://conventional-branch.github.io/)
- Message: Check if the commit message follows the [conventional commit specification](https://www.conventionalcommits.org)
- Sign-off: Check if the commit is signed off
## Getting started
If you want to use it on Github, try out the [Github Action](https://github.com/aljoshare/commala-action). You can find an example workflow [here](examples/github/example.yml). For Gitlab CI/CD, you can copy [this example](examples/gitlab/.gitlab-ci.yml) and modify it to your needs.
### Configuration
You can configure commala via `.commala.yml` or command line parameters. By default, commala looks for `.commala.yml` in the current directory or `$HOME/.commala/`. You can specify a custom config file path using the `--config` flag or `COMMALA_CONFIG` environment variable:
```shell
commala check HEAD~5 --config=/path/to/custom-config.yml
```
```yaml
report:
junit:
path: commala-junit.xml # --report-junit-path
validate:
author:
name:
enabled: true # --author-name-enabled
whitelist: [] # --author-name-whitelist
email:
enabled: true # --author-email-enabled
whitelist: [] # --author-email-whitelist
branch:
enabled: true # --branch-enabled
whitelist: [] # --branch-whitelist
message:
enabled: true # --message-enabled
whitelist: [] # --message-whitelist
signoff:
enabled: true # --signoff-enabled
whitelist: [] # --signoff-whitelist
```
### Contributor Whitelists
Commala supports whitelisting specific contributors (by email) to skip validation for their commits. This is useful for automated bot accounts like Dependabot or Renovate that may not follow conventional commit standards.
Each validator can have its own whitelist configured via `.commala.yml`:
```yaml
validate:
branch:
enabled: true
whitelist:
- "dependabot[bot]@users.noreply.github.com"
- "renovate[bot]@users.noreply.github.com"
message:
enabled: true
whitelist:
- "dependabot[bot]@users.noreply.github.com"
```
Or via CLI flags:
```bash
commala check HEAD~5 \
--branch-whitelist="dependabot[bot]@users.noreply.github.com" \
--message-whitelist="dependabot[bot]@users.noreply.github.com"
```
**How It Works:**
- Commits from whitelisted authors are marked as "skipped" during validation
- Skipped commits are clearly marked in console output (gray color)
- JUnit reports include `` elements for whitelisted commits
- Skipped commits don't count as failures
- Whitelist matching uses exact email comparison (case-sensitive)
### CLI
The commala command is pretty easy. You can run the checks on all commits like this:
```shell
commala check
```
If you want to check all commits, just pass two dots:
```shell
commala check ..
```
If you want to specify the commit to start and check until HEAD, just specify the commit hash followed by two dots:
```shell
commala check a1b2c3d4e5f67890abcdef1234567890abcdef12..
```
If you want to specify the commit to end the check and start from the beginning, just specify the commit hash preceded by two dots:
```shell
commala check ..a1b2c3d4e5f67890abcdef1234567890abcdef12
```
If you want to specify a commit range, just specify two commit hashes with two dots between them:
```shell
commala check f725bf88adb76df5c8c576b514def199e20fc6a0..a1b2c3d4e5f67890abcdef1234567890abcdef12
```
If you want to specify a negative index, just use the swung dash notation:
```shell
commala check HEAD~3
```
### Result
To make it easy to use commala as part of a CI/CD job, it will output the result on the command line but also writes the result in JUnit XML format, so that it can be picked up by the source code versioning system of your choice. If one of the checks fails, commala will exit with a non-zero status.