Skip to content

nodejs/core-validate-commit

Folders and files

NameName
Last commit message
Last commit date
Sep 2, 2024
Mar 30, 2023
Aug 5, 2024
Jul 17, 2024
Oct 28, 2016
Jun 11, 2019
Apr 21, 2016
Apr 5, 2021
Mar 30, 2023
Sep 2, 2024

Repository files navigation

core-validate-commit

Build Status codecov

Validate the commit message for a particular commit in node core

Install

$ npm install [-g] core-validate-commit

Usage

# for a single commit
$ core-validate-commit <sha>

# validate since <sha>
$ git rev-list <sha>..HEAD | xargs core-validate-commit

# list all rules
$ core-validate-commit --list
         fixes-url enforce format of Fixes URLs
  line-after-title enforce a blank newline after the commit title
       line-length enforce max length of lines in commit body
      metadata-end enforce that metadata is at the end of commit messages
            pr-url enforce PR-URL
         reviewers enforce having reviewers
         subsystem enforce subsystem validity
      title-format enforce commit title format
      title-length enforce max length of commit title

To see a list of valid subsystems:

$ core-validate-commit --list-subsystem

Valid subsystems are also defined in lib/rules/subsystem.js.

Test

$ npm test

Author

Evan Lucas

License

MIT (See LICENSE for more info)