mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
dev: add linter rule for commit capitalization
Bad: 'fix(abc): Prevent freezes' Good: 'fix(abc): prevent freezes'
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user