mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -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")
|
"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 ()
|
(cons (lambda ()
|
||||||
(looking-at "^\\(bump\\|revert\\|release\\|merge\\|module\\)!?([^)]+):"))
|
(looking-at "^\\(bump\\|revert\\|release\\|merge\\|module\\)!?([^)]+):"))
|
||||||
"This commit type's scope goes after the colon, not before")
|
"This commit type's scope goes after the colon, not before")
|
||||||
|
Reference in New Issue
Block a user