From aa2f806b5bb1c30297002cedf45450c2a45b133e Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Sat, 30 Oct 2021 17:41:06 +0300 Subject: [PATCH] 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. --- core/cli/ci.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cli/ci.el b/core/cli/ci.el index 32bf4a983..389cad76c 100644 --- a/core/cli/ci.el +++ b/core/cli/ci.el @@ -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)))