dev(ci): fix commit linter receiving empty summary

split-string is not side-effect free. It changes the match data (it uses
regexp to split strings).
This commit is contained in:
Henrik Lissner 2021-09-30 13:00:08 +02:00
parent fb34b5e24c
commit e9b13393eb

View file

@ -264,8 +264,8 @@
(when (looking-at "^\\([a-zA-Z0-9_-]+\\)\\(!?\\)\\(?:(\\([^)]+\\))\\)?: \\([^\n]+\\)")
(setq type (intern (match-string 1))
bang (equal (match-string 2) "!")
scopes (ignore-errors (split-string (match-string 3) ","))
summary (match-string 4)))))
summary (match-string 4)
scopes (ignore-errors (split-string (match-string 3) ","))))))
(unless (string-match-p "^\\(?:\\(?:fixup\\|squash\\)!\\|FIXUP\\|WIP\\) " subject)
(dolist (fn doom-cli-commit-rules)
(pcase (funcall fn