dev(ci): minor refactor & reformatting
This commit is contained in:
parent
710eab10c7
commit
bac7ccb970
1 changed files with 12 additions and 13 deletions
|
@ -195,7 +195,6 @@ representing the current commit being checked against. See
|
||||||
(length refs) (string-join (nreverse refs) ", "))))))
|
(length refs) (string-join (nreverse refs) ", "))))))
|
||||||
|
|
||||||
;; TODO Add bump validations for revert: type.
|
;; TODO Add bump validations for revert: type.
|
||||||
|
|
||||||
(fn! (&key body trailers)
|
(fn! (&key body trailers)
|
||||||
"Validate commit trailers."
|
"Validate commit trailers."
|
||||||
(let* ((keys (mapcar #'car doom-cli-commit-trailer-keys))
|
(let* ((keys (mapcar #'car doom-cli-commit-trailer-keys))
|
||||||
|
@ -376,18 +375,18 @@ Note: warnings are not considered failures.")
|
||||||
(let* ((commit (doom-cli--parse-commit commitmsg))
|
(let* ((commit (doom-cli--parse-commit commitmsg))
|
||||||
(shortref (substring ref 0 7))
|
(shortref (substring ref 0 7))
|
||||||
(subject (plist-get commit :subject)))
|
(subject (plist-get commit :subject)))
|
||||||
(letf! ((defun skip! (reason &rest args)
|
(cl-block 'linter
|
||||||
(print! (warn "Skipped because: %s") (apply #'format reason args))
|
(letf! ((defun skip! (reason &rest args)
|
||||||
(cl-return-from 'linter))
|
(print! (warn "Skipped because: %s") (apply #'format reason args))
|
||||||
(defun warn! (reason &rest args)
|
(cl-return-from 'linter))
|
||||||
(cl-incf warnings)
|
(defun warn! (reason &rest args)
|
||||||
(print! (warn "%s") (apply #'format reason args)))
|
(cl-incf warnings)
|
||||||
(defun fail! (reason &rest args)
|
(print! (warn "%s") (apply #'format reason args)))
|
||||||
(cl-incf failures)
|
(defun fail! (reason &rest args)
|
||||||
(print! (error "%s") (apply #'format reason args))))
|
(cl-incf failures)
|
||||||
(print! (start "%s %s") shortref subject)
|
(print! (error "%s") (apply #'format reason args))))
|
||||||
(print-group!
|
(print! (start "%s %s") shortref subject)
|
||||||
(cl-block 'linter
|
(print-group!
|
||||||
(mapc (doom-rpartial #'apply commit)
|
(mapc (doom-rpartial #'apply commit)
|
||||||
doom-cli-commit-rules)))))))
|
doom-cli-commit-rules)))))))
|
||||||
(let ((issues (+ warnings failures)))
|
(let ((issues (+ warnings failures)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue