From e9b13393ebf845a5ce0447f80870c60f3af2d4f0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Sep 2021 13:00:08 +0200 Subject: [PATCH] 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). --- core/cli/ci.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cli/ci.el b/core/cli/ci.el index cf0198747..68c2addee 100644 --- a/core/cli/ci.el +++ b/core/cli/ci.el @@ -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