dev: add linter rules for module type

Recently added 'module' to our list of git commit types to represent
changes to our module list. These events are important enough to
Doom (and users) to track separately.
This commit is contained in:
Henrik Lissner 2021-08-01 11:38:09 -04:00
parent 258ef30b4d
commit 3d423862d7

View file

@ -41,13 +41,13 @@
(cons (concat
"^\\("
(regexp-opt
'("bump" "dev" "docs" "feat" "fix" "merge" "nit" "perf"
'("bump" "dev" "docs" "feat" "fix" "merge" "module" "nit" "perf"
"refactor" "release" "revert" "test" "tweak"))
"\\)!?[^ :]*: ")
"Invalid type")
(cons (lambda ()
(looking-at "^\\(bump\\|revert\\|release\\|merge\\)!?([^)]+):"))
(looking-at "^\\(bump\\|revert\\|release\\|merge\\|module\\)!?([^)]+):"))
"This commit type's scope goes after the colon, not before")
(cons (lambda ()
@ -89,6 +89,8 @@
nil t))))
"Bump commit doesn't contain commit diff")
;; TODO Add bump validations for revert: type.
(cons (lambda ()
(re-search-forward "^\\(\\(Fix\\|Clos\\|Revert\\)ed\\|Reference[sd]\\): "
nil t))