Skip to content

Commit

Permalink
Fix call to ns-groups when :filename-pattern in use
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Monroe committed May 22, 2024
1 parent 0ac5e49 commit c034f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/clojure_lsp/feature/diagnostics.clj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
(defn ^:private unused-public-var->finding [element kondo-config]
(let [keyword-def? (identical? :keyword-definitions (:bucket element))
kondo-config (if (:ns element)
(kondo-config-for-ns kondo-config (:ns element) (:filename element))
(kondo-config-for-ns kondo-config (:ns element) (-> element :uri shared/uri->filename))
kondo-config)]
{:uri (:uri element)
:row (:name-row element)
Expand All @@ -59,7 +59,7 @@
:type :clojure-lsp/unused-public-var}))

(defn ^:private exclude-public-diagnostic-definition? [db kondo-config definition]
(let [kondo-config (kondo-config-for-ns kondo-config (:ns definition) (:filename definition))
(let [kondo-config (kondo-config-for-ns kondo-config (:ns definition) (-> definition :uri shared/uri->filename))
excluded-syms-regex (get-in kondo-config [:linters :clojure-lsp/unused-public-var :exclude-regex] #{})
excluded-defined-by-syms-regex (get-in kondo-config [:linters :clojure-lsp/unused-public-var :exclude-when-defined-by-regex] #{})
excluded-metas (get-in kondo-config [:linters :clojure-lsp/unused-public-var :exclude-when-contains-meta] #{})
Expand Down

0 comments on commit c034f2b

Please sign in to comment.