clj-kondo

https://github.com/clj-kondo/clj-kondo
Juλian (he/him) 2021-07-01T09:09:26.300300Z

how can I make clj-kondo aware of Quil's defsketch macro? it always flags the following symbol as "unresolved symbol" error

borkdude 2021-07-01T09:11:19.301Z

@julian608 depending on what the macro does, you can use :lint-as. e.g. {:lint-as {foo.bar/defsketch clojure.core/def}}

borkdude 2021-07-01T09:12:16.301300Z

some examples would help (the docs only give docs but no examples)

borkdude 2021-07-01T09:12:46.301500Z

I see:

(defsketch my-sketch
  :size [500 500]
  :draw draw))

borkdude 2021-07-01T09:13:07.302Z

I think for this one you'll probably want to use clj-kondo.lint-as/def-catch-all

Juλian (he/him) 2021-07-01T09:17:12.303800Z

thanks! linting as def turns it into info "unused public var", and def-catch-all makes it accepted... will try it like that

borkdude 2021-07-01T14:40:14.303900Z

Can clj-kondo also fix the things it reports? No, it only analyzes and reports, but clojure-lsp can use that data to fix :)

1
🎉 2