🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

commitplease

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitplease

Validates strings as commit messages

1.0.0
Source
npm
Version published
Weekly downloads
14K
-22.42%
Maintainers
1
Weekly downloads
 
Created
Source

Commitplease

Build Status

This node.js module takes a string, validates it as a commit message and returns a list of problems.

Installation

npm install commitplease

Usage

var commitplease = require('commitplease');
var errors = commitplease(commit.message);
if (errors.length) {
	postComment('This commit has ' errors.length + ' problems!');
}

API

commitplease(message[, options]), returns Array

  • message (String): The commit message to validate. Must use LF (\n) as line breaks.
  • options (Object, optional): Use this to override the default settings, see properties and defaults below
  • returns Array: Empty for valid messages, one or more items as String for each problem found

Options and their defaults:

// component in subject is required
component: true,
limits: {
	// hard limit of subject
	subject: 50,
	// hard limit of all other lines
	other: 72
}

License

Copyright 2013 Jörn Zaefferer. Released under the terms of the MIT license.

Support this project by donating on Gittip.

Keywords

commit

FAQs

Package last updated on 09 Jan 2014

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