GitXplorerGitXplorer
j

vscode-git-fit-commit

public
1 stars
0 forks
1 issues

Commits

List of commits on branch main.
Unverified
faa8b126e929071dbfc75d45fe757f3fd95dc1c9

fix: do not lint commit types with scopes

jjoyceerhl committed 4 months ago
Unverified
56e21ed45735948452a064178efd0d16c773a459

chore: npm audit fix

jjoyceerhl committed 4 months ago
Unverified
84ca73ff2cde54c7dca5fe5774eddb14c962f85b

fix: don't strip newlines by default

jjycrhl committed 4 months ago
Unverified
b29a5c3540832be3519e9b4d3ab1259d9b11578c

docs: break gifs onto newline

jjoyceerhl committed a year ago
Unverified
3ace7bf9576af2c7bab9eb341cb47ab21a066c07

chore: improve description

jjoyceerhl committed a year ago
Unverified
3ea2b619afc78ec94043a9e1af9889e507a9dc69

chore: add a display name

jjoyceerhl committed a year ago

README

The README file for this repository.

Git 50/72 Commit Message Formatter

This is a Visual Studio Code extension that formats git commit messages in the source control input box according to the 50/72 rule. It also supports optional linting and quick fixes for missing type: subject line prefixes.

Usage

  1. Install the extension in VS Code.

  2. Write a commit message in the source control view input box.

  3. If either the subject line or the body exceeds the configured limit, a validation message will appear in the source control input box. Use the Quick Fix command (Ctrl+.) to access and run the Format commit message code action.

    Commit message quick fix

  4. If your commit message lacks a type: prefix, a validation message will appear in the source control input box. Use the Quick Fix command (Ctrl+.) to access and run the Add commit type code action.

    Commit message type warning and quick fix

  5. Happy committing!

Configuration options

  • Configure how long your commit message subject lines and bodies should be with the following settings:
    • git.inputValidationSubjectLength (default: 50 chars)
    • git.inputValidationLength (default: 72 chars)
  • Enable editor.formatOnType to automatically format your commit message when you insert a newline.
  • Configure how overly long subject lines should wrap when formatted with gitCommit.subjectLine.overflowStrategy (default: split)
  • Configure whether you want validation and quick fixes for commit types in the subject line:
  • Configure whether you want the formatter to strip multiple successive newlines:
    • gitCommit.collapseMultipleEmptyLines.enabled (default: false)

Development

Prerequisites

  • Node.js
  • Visual Studio Code

Setup

  1. Clone the repository.
  2. Run npm install to install the dependencies.
  3. Open the project in VS Code.

Build

Press F5 to compile the extension source code and launch the extension development host.

Test

Run npm test to run the tests.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT