dev(ci): fix false negative in commit linter

The one value allowed per trailer check shouldn't apply to names since
they often have spaces.
This commit is contained in:
Itai Y. Efrat 2021-10-30 17:41:06 +03:00
parent ea18315d08
commit aa2f806b5b

View file

@ -219,7 +219,8 @@ representing the current commit being checked against. See
(truncate-string-to-width (string-trim line) 16 nil nil "")
(match-string 1 line))))
(pcase-dolist (`(,key . ,value) trailers)
(if (string-match-p " " value)
(if (and (not (memq 'name (cdr (assoc key doom-cli-commit-trailer-keys))))
(string-match-p " " value))
(fail! "Found %S, but only one value allowed per trailer"
(truncate-string-to-width (concat key ": " value) 20 nil nil ""))
(when-let (allowed-types (cdr (assoc key doom-cli-commit-trailer-keys)))