New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

git-commit-message-checker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-commit-message-checker

GIT COMMIT-MSG hook for validating commit message.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

git-commit-message-checker

git-commit-message-checker is a tools for checking whether your commit message is valid or not. If not, your commit will fail.

Installation

npm install --save-dev git-commit-message-checker

How to use

git-commit-message-checker need to be used with Husky. Add this config to package.json

"scripts": {
   "commitmsg": "check-git-commit-msg --max-length=150 --pattern=\"/^\[[\w-]*\]\s\w*(\s&\s\w*)?\s?:.*/\"",
   ....
}

--pattern

The default commit message pattern is:

/^\[[\w-]*\]\s\w*(\s&\s\w*)?\s?:.*/

It can allow the commit message like this:

  • [CardNumber] author: commit purpose
  • [CardNumber] author1 & author2: commit purpose

--max-length

The default commit message max-length is 150, you can change it in the command line

Keywords

git

FAQs

Package last updated on 18 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts