Fork me on GitHub
#clj-kondo
<
2023-05-20
>
Joshua Gelbard22:05:11

I'm trying to ignore unused refers in comments. before I make a github issue—this should work, right?

;; foo.clj
(ns foo)
(comment
 (require '[a :refer [shouldnt-warn]]))
;; config.edn
{:config-in-comment {:linters {:unused-referred-var {:level :off}}}}
with the expected result being that no warnings are printed. (in fact, a warning is printed.)

Joshua Gelbard22:05:32

CLI one-liner version echo "(comment (require '[a :refer [shouldnt-warn]]) a/a)" | clj-kondo --config "{:config-in-comment {:linters {:unused-referred-var {:level :off}}}}" --lint -

borkdude10:05:18

You're right, this seems to be a bug. Github issue welcome!

👍 2