Another new linter landed on master. Unused excluded var. A nice bit of cleaning to do of accumulated excluded core vars that were sitting there doing nothing :) π§Ή Thanks @jonurnieta
@jonurnieta I found one false positive here:
I'll make an issue for it
I'm now looking into it. Seems an issue with defmulti
Ah, found the issue. The linter complains because in the cljs part of the .cljc file the deref var isn't used.
(ns scratch
{:no-doc true}
(:refer-clojure :exclude [#?(:clj deref) -deref])
(:require
[sci.impl.types :as types]))
(defmulti #?(:clj deref :cljs -deref) types/type-impl)Maybe we should limit the warning if it's true for both branches only?
Yes, that could be a solution. Or maybe suggest excluding only in clj part. I think is cleaner limiting the warning if itβs true for both branches
That's not consistent with the :refer-clojure-exclude-unresolved-var linter
> I think is cleaner limiting the warning if itβs true for both branches ah yes
okey, I will try to look at both branches then
Thanks for the reproduction examples
I'm already looking at this, no PR needed
ππΏ thank you
pushed to master
Nice! ππΏ
Also updated the findings on master now... it gets rid off a whole number of new findings :)
I now realize that the names of :unused-excluded-var and :refer-clojure-exclude-unresolved-var are not consistent. Maybe we should rename the latter to :unresolved-excluded-var?
I used :unused-β¦ based on others like unused-value, unused-import etc
makes sense but would be nice if names could be consistent
What about unused-refer-clojure-exclude ?
I was suggesting to change the name of the other linter
Ahh okey
I like unresolved-excluded-var then
me too
If you want to do a PR, that would be great. Else I'll do it later
Okey, I will do it now
Done!