Fork me on GitHub
#clj-kondo
<
2022-03-17
>
robert-stuttaford07:03:05

is it possible to squash a deprecation warning for a specific var, at the config.edn level? i know that i can #_:clj-kondo/ignore them one by one, but it'd be great if i could do it once for the whole codebase warning: #'hiccup.core/html is deprecated since 2.0

borkdude07:03:46

Yes, see linters.md

robert-stuttaford07:03:42

lol, why did i fail to find that myself. thanks and sorry!

robert-stuttaford07:03:01

got it sorted, thanks sir

borkdude07:03:23

No problem :-) I'm afk, so short reply

robert-stuttaford07:03:09

concise and correct, like all good clojure code

dpsutton14:03:11

I was about to make an issue about this but want to check that I’m not doing something dumb:

(ns bug
  (:import java.util.Collection))

(defmulti foo {:arglists '([^Collection coll])} first)
clj-kondo is reporting the import of j.u.Collection is unused. Not clear to me if • it is unused because that typehint isn’t doing anything • it is used by clj-kondo is getting thrown because it is inside of a quoted form

dpsutton14:03:09

interestingly, changing it to

(defmulti foo {:arglists (list [^Collection 'coll])} first)
did not remove the unused warning

borkdude14:03:33

it's a bug.

👍 1
borkdude14:03:42

but why do you place type hints on the arglists?

borkdude14:03:20

I mean, that is valid, just wondering why

borkdude14:03:56

issue welcome

dpsutton14:03:59

no idea. it is before my time

dpsutton14:03:05

typed up the issue and github 500'd 😞

dpsutton14:03:14

But i wanted to ask here because i was aware “that is a really dumb thing to do” might have been an answer 🙂

borkdude14:03:36

neh, this should not result in a lint warning

dpsutton14:03:55

yeah it felt both like “that’s dumb, but it should work, but its still dumb”

borkdude17:03:36

I had a closer look and commented on the issue, it probably wasn't a bug after all