clj-kondo

https://github.com/clj-kondo/clj-kondo
maxp 2020-08-13T05:14:45.000600Z

In that script

#!/usr/bin/env bb
;; (require '[babashka.classpath])
(babashka.classpath/add-classpath ".")
clj-kondo shows deprecation warning for clojure.core/add-classpath is that correct?

maxp 2020-08-13T05:17:10.001400Z

there is no such warning when I uncomment require line.

borkdude 2020-08-13T05:19:08.002Z

Probably a bug. Can you make an issue?

maxp 2020-08-13T08:02:14.002500Z

hmm... or may be it is Calva's mistake

maxp 2020-08-13T08:02:59.003100Z

how clj-kondo intended to work with babashka scripts?

maxp 2020-08-13T08:07:16.003800Z

Yes. that was when I connect to Clojure repl but open babashka script in editor.

maxp 2020-08-13T08:11:09.005200Z

That was a little bit confusing when clj-kond tells about clojure.core/add-classpath underlining babashka.classpath/add-classpath

maxp 2020-08-13T08:13:09.006200Z

But what about ,cljb extensions? 🙂 it is the time to introduce!

dominicm 2020-08-13T08:14:50.007200Z

Kondo should know those two things aren't the same :) regardless of file extension for bb or not.

dominicm 2020-08-13T08:15:38.007900Z

Does the error happen when running kondo from the cli?

borkdude 2020-08-13T08:26:58.008500Z

@maxp I can't reproduce with the above:

$ clj-kondo --lint /tmp/foo.clj
/tmp/foo.clj:4:2: warning: Unresolved namespace babashka.classpath. Are you missing a require?
linting took 10ms, errors: 0, warnings: 1

borkdude 2020-08-13T08:27:26.009Z

Of course if you only write add-classpath unqualified, clj-kondo is going to think it's from clojure.core and then it's indeed deprecated