clj-kondo

https://github.com/clj-kondo/clj-kondo
maxp 2021-01-31T09:39:47.067300Z

Should clj-kondo handle such things correctly? https://github.com/seancorfield/honeysql/blob/2793619e50cb651545637072b10d765856f2b784/src/honeysql/core.cljc#L13

borkdude 2021-01-31T09:40:37.068600Z

@maxp clj-kondo doesn't know what defalias is, but you can configure it to :lint-as clojure.core/def

maxp 2021-01-31T09:41:54.069400Z

ok, thank you.

maxp 2021-01-31T09:43:32.070600Z

But as I remember there was no such warnings in honeysql... something was changed in last 2-3 weeks?

borkdude 2021-01-31T09:43:53.071Z

@maxp What changed is that clj-kondo can now detect unresolved vars in other namespaces

maxp 2021-01-31T09:44:12.071500Z

Great!

borkdude 2021-01-31T09:44:17.071600Z

{:linters {:unresolved-var {:level :warning}}} is the default setting

maxp 2021-01-31T09:47:35.072400Z

my default config now -

{
  :linters
  {
    :unused-referred-var
    {:exclude 
      {taoensso.timbre  [debug info warn]}}

    :unused-namespace
    {:exclude [taoensso.timbre]}}

  :lint-as 
  {
    mount.core/defstate                 clojure.core/def
    garden.def/defstyles                clojure.core/def
    honeysql.util/defalias              clojure.core/def
    <http://clojurewerkz.quartzite.jobs/defjob|clojurewerkz.quartzite.jobs/defjob>  clojure.core/defn
    next.jdbc/with-transaction          clojure.core/with-open}}
probably could help some one else...

👍 1
borkdude 2021-01-31T09:48:27.073Z

I think the next.jdbc one isn't needed anymore since clj-kondo now has built-in support for it, courtesy of seancorfield

maxp 2021-01-31T09:49:02.073400Z

o! really? ... that's good