mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-03-22 21:24:02 -05:00
Fixed type lengths [suggestion] #94
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ArisKallergis on GitHub (Mar 16, 2020).
I'm not really sure if I should be posting a suggestion here, I'm sorry in advance if I shouldn't!
It was bothering me that types didn't have a fixed length, because I had to zip around to look at the actual commit messages. I propose for types to be exactly 3 characters, followed by a colon, followed by a whitespace. Furthermore, I find that I like types being all-caps, allowing for messages to begin with a lowercase letter. I believe that the scope, which is optional, should be added in the end of a message, either in parentheses, or in square brackets. Square brackets in my opinion are the better solution, because you might need a parentheses inside your message.
Types are:
FTR: feat
FIX: fix
PRF: perf
TST: test
RFC: refactor (I'm also thinking of RFR for this)
CHR: chore
BLD: build
CIN: ci
DOC: docs
STL: style
REV: revert
Here I include a sample from a repo I'm working on alongside a tutorial (I have my own EXA=example type here):

EDIT: I understand that my commits may be silly in this case of course!
In the screenshot you might also notice:
I think readability improves a lot with this, let's discuss if you'd like!
@damianopetrungaro commented on GitHub (Mar 18, 2020):
Hey @ArisKallergis thanks for opening an issue!
Personally I do not see a high value in introducing it as standard in the specs since the tooling around it should also have to implement it, and, it is not a hard tech solution to iterate over the bytes of a string until there's a
:.To clarity: since the specs allow you to define your own custom type it's totally fine to define custom one as you did,and if those fit your use case it is totally fine!
@erdaltsksn commented on GitHub (Jul 21, 2020):
I have a little different approach about this. I use four-letters types, but there is exception for
fixso it is easier to spot the fixes.In my dotfiles, you can find an example commit template with a Vim plugin.