dev: add linter rule for commit capitalization

Bad:  'fix(abc): Prevent freezes'
Good: 'fix(abc): prevent freezes'
This commit is contained in:
Henrik Lissner 2021-08-01 15:34:26 -04:00
parent 5d1d0fc7c9
commit 11a0c0cbdb

View file

@ -46,6 +46,12 @@
"\\)!?[^ :]*: ")
"Invalid type")
(cons (lambda ()
(when (re-search-forward "^[^ :]+: " nil t)
(and (looking-at "[A-Z][^-]")
(not (looking-at "\\(SPC\\|TAB\\|ESC\\|LFD\\|DEL\\|RET\\)")))))
"Do not capitalize the first word of the subject")
(cons (lambda ()
(looking-at "^\\(bump\\|revert\\|release\\|merge\\|module\\)!?([^)]+):"))
"This commit type's scope goes after the colon, not before")