From cf1c6e9a68d744420302b50961d49114b60def44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 12 Sep 2022 17:22:36 +0200 Subject: [PATCH] dev(ci): fix commit linter config for module scopes This file used to live in /.github/ci.el. It was later moved to /.doomrc (in 9b8ed39), but I forgot to push this change to update the relative path to Doom's modules. This caused the linter to complain that all module scopes were invalid. Also, I removed the $DOOMDIR/modules/ check, as modules in the user's config shouldn't be factored into the list of valid scopes. Amend: 9b8ed397e8e7 --- .doomrc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.doomrc b/.doomrc index 12180d703..d0d07a4e7 100644 --- a/.doomrc +++ b/.doomrc @@ -35,16 +35,13 @@ doom-make-codeowners))))) ;;; Helpers -(cl-defun ci-check-module-scope (scope (&key type &allow-other-keys)) +(defun ci-check-module-scope (scope _plist) "Only allow :CATEGORY or MODULE scopes if they actually exist." - (seq-find (doom-rpartial - #'doom-glob (if (string-prefix-p ":" scope) - (format "%s" (substring scope 1)) - (format "*/%s" scope))) - (list (doom-path (dir!) "../modules/") - (doom-path doom-user-dir "modules/")))) + (doom-glob (dir!) "modules" (if (string-prefix-p ":" scope) + (format "%s" (substring scope 1)) + (format "*/%s" scope)))) -(defun ci-check-docs-scope (scope _) +(defun ci-check-docs-scope (scope _plist) "Allow any filename in docs/* as a scope for docs commits." (member scope (doom-files-in (doom-path (dir!) "../docs")