dev: add linter rule for commit capitalization
Bad: 'fix(abc): Prevent freezes' Good: 'fix(abc): prevent freezes'
This commit is contained in:
parent
5d1d0fc7c9
commit
11a0c0cbdb
1 changed files with 6 additions and 0 deletions
|
@ -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")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue