Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call to ns-groups when :filename-pattern in use #1825

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- General
- Bump clj-kondo to `2024.05.22` fixing high memory usage issue.
- Bump Clojure to `1.11.3`
- Fix use of `:filename-pattern` from kondo breaking references.

## 2024.04.22-11.50.26

Expand Down
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
Loading