Skip to content

VSCode git commit message highlighter nicer than the built-in one

License

Notifications You must be signed in to change notification settings

walles/git-commit-message-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6467fbe · Mar 29, 2025
Feb 1, 2023
Feb 2, 2023
Mar 14, 2023
Feb 6, 2023
Feb 6, 2023
Jan 26, 2023
Jan 22, 2023
Feb 15, 2023
Jan 26, 2023
Feb 6, 2023
Jan 23, 2023
Mar 7, 2023
Feb 16, 2023
Mar 29, 2025
Feb 20, 2025
Jan 24, 2023

Repository files navigation

CI Status

Git Commit Message Plus

A git commit message highlighter being nicer than the built-in one.

Report issues here: https://github.com/walles/git-commit-message-plus/issues

Prep

Set VSCode as your Git commit editor. Then when you git commit, you'll be supported in writing good Git commit messages.

Features

  • Quick Fixes for certain diagnostics
  • Inform about git commit -v if it isn't being used (with Quick Fix)
  • Code completion for JIRA issue IDs based on branch name
  • Diagnostics for:
    • > 50 characters subject lines
    • > 72 characters subject lines
    • Not-capitalized subject lines (with Quick Fix)
    • Trailing punctuation in the subject line (with Quick Fix)
    • Not-capitalized JIRA issue IDs (with Quick Fix)
    • JIRA issue ID conflicting with branch name (with Quick Fix)
    • Non-blank second lines

Highlighted Git commit message

Internal

TODO

  • Consider the tests for no-diffs for both diagnostics and quick fixes. Are we really testing for comment-line followed by an empty line at the end?
  • Disable @typescript-eslint/no-non-null-assertion in *.test.* files, or in the whole suite directory
  • Highlight current branch name in the Git metadata
  • Validate code formatting in CI and fail on violations
  • Fail CI on linter warnings
  • Move all tests under the same top subdirectory

Development

To run the unit tests:

npm install && npm test

To install into VSCode:

  1. npm run package
  2. In VSCode:
    • Click Extensions
    • Click the ... menu in the top right corner
    • Click Install from VSIX...
    • Pick the 99.99.99 one, that's the perpetual development version

To check highlighting in VSCode: "Developer: Inspect Editor Tokens and Scopes"

To publish a new version:

  1. Bump the "version" in package.json
  2. npm install to get that version into package-lock.json as well
  3. Commit the version bump ^
  4. git push
  5. git tag NEW-VERSION-NUMBER && git push --tags
  6. npm run publish