Skip to content

Commit b611faa

Browse files
committed
docs: improve readme
1 parent a77a5e2 commit b611faa

5 files changed

+18
-13
lines changed

README.md

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
# Git Commit Message Formatter
1+
# Git 50/72 Commit Message Formatter
22

3-
This is a Visual Studio Code extension that formats git commit messages in the source control input box.
3+
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.
44

5-
## Features
6-
7-
- Formats git commit messages according to a predefined style.
8-
9-
## How to use
5+
## Usage
106

117
1. Install the extension in VS Code.
12-
2. Write a commit message in the source control input box.
13-
3. If the message exceeds the configured limit (`git.inputValidationLength`), a validation message will appear in the source control input box. Use the Quick Fix command (`Ctrl+.`) to access the `Format commit message` code action.
8+
2. Write a commit message in the source control view input box.
9+
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.
10+
11+
<video src="format-quick-fix.mp4" controls title="Commit message quick fix"></video>
12+
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.
1413

15-
<video src="format-quick-fix.mp4" controls title="Commit message quick fix"></video>
14+
<video src="commit-type-fix.mp4" controls title="Commit message type warning and quick fix"></video>
15+
5. Happy committing!
1616

17-
4. Alternatively, enable `editor.formatOnType` to automatically format your commit message when you insert a newline.
18-
5. Enable lint warnings and quick fixes when your commit subject line does not start with a [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) type with `gitCommit.subjectLine.lint.enabled`. You can allowlist custom commit types using the `gitCommit.subjectLine.lint.types` setting.
17+
## Configuration options
1918

20-
<video src="commit-type-fix.mp4" controls title="Commit message type warning and quick fix"></video>
19+
* Configure how long your commit message subject lines and bodies should be with the following settings:
20+
- `git.inputValidationSubjectLength` (default: 50 chars)
21+
- `git.inputValidationLength` (default: 72 chars)
22+
* Enable `editor.formatOnType` to automatically format your commit message when you insert a newline.
23+
* Configure whether you want validation and quick fixes for commit types in the subject line:
24+
- `gitCommit.subjectLine.lint.enabled`: (default: `false`)
25+
- `gitCommit.subjectLine.lint.types` (default: `feat:`, `fix:` [and other Conventional Commit types](https://www.conventionalcommits.org/en/v1.0.0/))
2126

2227
## Development
2328

commit-type-fix.gif

586 KB
Loading

commit-type-fix.mp4

133 KB
Binary file not shown.

format-quick-fix.gif

619 KB
Loading

format-quick-fix.mp4

-1.17 MB
Binary file not shown.

0 commit comments

Comments
 (0)