commitlint
commitlint copied to clipboard
Add whitespace handling (trim) for commit messages
You mean if it's intended not to trim inputs? tbh I don't know. What would you expect? Is this blocking you in a way? Would be nice if you could add some more context to your issue.
Creating a commit message I usually use -m "[MESSAGE]"
and I don't have any spaces in there. Don't think it's commitlint's task to take care of this. But maybe this could be improved.
I expect it to not count leading whitespaces. Yes, it is super blocking in case of mistakes.
Do you have time and motivation to look into this?
So you want to allow leading whitespace? IMO, that's an invalid commit message and is being linted correctly - albeit with a misleading error message.
The purpose of commitlint is to throw errors when you make mistakes - so blocking is the correct behaviour. No?
The purpose of commitlint is to throw errors when you make mistakes
True, I can understand this as well
Currently when having a leading space, the error message says that the subject is empty. I suggest that the error message instead says that there is leading whitespace. This is due to identifying extra unwanted leading whitespace is hard in a commit message.
Thanks @marcalexiei https://github.com/conventional-changelog/commitlint/releases/tag/v18.6.0