https://github.com/kamadorueda/mailmap-linter
Small, easy to use, easy to install tool to lint your git mailmap
https://github.com/kamadorueda/mailmap-linter
Last synced: about 2 months ago
JSON representation
Small, easy to use, easy to install tool to lint your git mailmap
- Host: GitHub
- URL: https://github.com/kamadorueda/mailmap-linter
- Owner: kamadorueda
- License: unlicense
- Created: 2020-03-08T19:02:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-29T05:01:50.000Z (4 months ago)
- Last Synced: 2025-03-25T07:12:07.254Z (2 months ago)
- Language: Nix
- Homepage: https://github.com/kamadorueda/mailmap-linter
- Size: 24.4 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Mailmap Linter
## Description
Small, easy to use, easy to install tool to lint your git mailmap
## Verifications
- Mailmap file (.mailmap) must exist
- Mailmap must be sorted
- All authors in git history must be mapped
- All authors must conform to: `Name FamilyName `
- Exclude file (.mailmap-exclude). Optional. `.mailmap-exclude`
can contain a list of regular expressions (or be empty) to
exclude from the `.mailmap` file
- `--exclude` or `-e` argument. Optional. `mailmap-linter --exclude 'regex'`
If the excludes aren't too many then use `--exclude` instead of the exclude file, ex:
`mailmap-linter --exclude '^.* <.*[email protected]>$'`## Installation
Given you've installed Nix (https://nixos.org/nix/download.html)
Run the following command:
```bash
$ nix-env -i -f https://github.com/kamadorueda/mailmap-linter/archive/master.tar.gz
```## Use
Run from the root of the repository that you want to lint:
```bash
$ mailmap-linter
```Exclude with regex:
```bash
$ mailmap-linter --exclude '...'
```## Use inside your CI
Use Nixos/nix as the base image for your Job: https://hub.docker.com/r/nixos/nix
Then install and use the same commands for the local build
## Example
```bash
$ mailmap-linter
[INFO] Verifying if .mailmap exists
[INFO] Verifying if .mailmap-exclude exists
[INFO] Computing contributors
[INFO] Reading current .mailmap
[INFO] Reading current .mailmap-exclude
[INFO] Verifying .mailmap format
[INFO] Verifying that every author is in the .mailmap
[INFO] Verifying: GitHub
[INFO] Excluded: GitHub
[INFO] Verifying: Kevin Amado
[INFO] Verifying: Robin Quintero
[INFO] Verifying: Timothy DeHerrera
[INFO] Verifying that .mailmap is sorted
[INFO] OK
```