diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-09-27 12:34:52 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-09-27 12:34:52 +0300 |
| commit | 9e4d8a96bda5e6836a231ec49ed066ba4d8e2204 (patch) | |
| tree | ad0303fa17853f13bfe554001335b613f73f2139 /resources/clj-kondo/hooks/dompa.clj | |
| parent | af83d8c7cdf85b675016eeeecaa85bb547141f4b (diff) | |
Use `doseq` instead of wrapping `for` with a `doall`.
Diffstat (limited to 'resources/clj-kondo/hooks/dompa.clj')
| -rw-r--r-- | resources/clj-kondo/hooks/dompa.clj | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/resources/clj-kondo/hooks/dompa.clj b/resources/clj-kondo/hooks/dompa.clj index a5c802f..24597ef 100644 --- a/resources/clj-kondo/hooks/dompa.clj +++ b/resources/clj-kondo/hooks/dompa.clj @@ -14,14 +14,13 @@ (or (api/string-node? first-arg) (api/token-node? first-arg)) (let [invalid-args (filter #(not (str-able? %)) rest-args)] - (doall - (for [invalid-arg invalid-args] - (api/reg-finding! - (assoc (meta invalid-arg) - :message (str "Invalid argument type. When creating a text node, " - "only literal values (strings, numbers and symbols) " - "are allowed.") - :type :dompa.templates/$-arg-validation))))) + (doseq [invalid-arg invalid-args] + (api/reg-finding! + (assoc (meta invalid-arg) + :message (str "Invalid argument type. When creating a text node, " + "only literal values (strings, numbers and symbols) " + "are allowed.") + :type :dompa.templates/$-arg-validation)))) ; if the first arg is a keyword, then the second argument can only be ; a sequence or a map. @@ -39,13 +38,12 @@ (and (api/keyword-node? first-arg) (api/list-node? (first rest-args)) (not (every? #(api/list-node? %) (rest rest-args)))) - (doall - (for [arg (filter #(not (api/list-node? %)) rest-args)] - (api/reg-finding! - (assoc (meta arg) - :message (str "Invalid argument type. Argument must be a $ macro " - "or a sequence of $ macros.") - :type :dompa.templates/$-arg-validation)))) + (doseq [arg (filter #(not (api/list-node? %)) rest-args)] + (api/reg-finding! + (assoc (meta arg) + :message (str "Invalid argument type. Argument must be a $ macro " + "or a sequence of $ macros.") + :type :dompa.templates/$-arg-validation))) ; if the first arg is a keyword, the second arg is a map, then from ; the second forwards everything has to be a list node @@ -77,10 +75,9 @@ ; rest of the arguments should be a list (not (every? #(api/list-node? %) rest-args)) - (doall - (for [arg rest-args] - (api/reg-finding! - (assoc (meta arg) - :message (str "Invalid argument type. Argument must be a $ macro " - "or a sequence of $ macros.")))))))) + (doseq [arg rest-args] + (api/reg-finding! + (assoc (meta arg) + :message (str "Invalid argument type. Argument must be a $ macro " + "or a sequence of $ macros."))))))) |
