conventional-changelog / conventional-changelog/commitlint

Question: suggested process for handling accidental leading or trailing whitespace in subject

Open
#4,589 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
18.7k
Forks
970
Avg merge
7h 33m
Merged PRs (30d)
49

Description

I find that I accidentally add trailing whitespace in the subject of commit messages. I am appreciative that commitlint catches this before the commit is made, but wish that commitlint could fix this simple case before completely rejecting the commit which is often annoying and disrupts my train of thought.

I understand that commitlint is largely designed to check and not adjust commit messages, but other linters often have a --fix option to solve the simplest of issues. While adding a fix option might not be on the roadmap, what are the suggested workarounds for this scenario? I'm curious to hear what other members of the community do about this.

Currently, in this scenario I copy the content of the rejected commit message from .git/COMMIT_EDITMSG and try again with a fix. But this adds an extra step that slows things down.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.