Giter VIP home page Giter VIP logo

mailmap-linter's Introduction

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 <[email protected]>
  • 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:

$ 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:

$ mailmap-linter

Exclude with regex:

$ 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

$ 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 <[email protected]>
  [INFO] Excluded: GitHub <[email protected]>
  [INFO] Verifying: Kevin Amado <[email protected]>
  [INFO] Verifying: Robin Quintero <[email protected]>
  [INFO] Verifying: Timothy DeHerrera <[email protected]>
[INFO] Verifying that .mailmap is sorted
  [INFO] OK

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.