Fork me on GitHub
#clj-kondo
<
2023-07-03
>
pez15:07:14

If I have two files with the same namespace, say a/foo/bar.clj and b/foo/bar.clj with ns foo.bar, I can evaluate symbols defined in a from b, but clj-kondo will warn if the symbols are not defined in b. I guess this is by design, but wonder if there is a chance a config could be added to make clj-kondo treat b as part of a, or something?

borkdude15:07:54

if you have two files with namespaces of the same name, they will override

pez16:07:37

You mean in the repl?

pez16:07:48

Alternatively. Can I disable linting for directory tree?

pez16:07:09

Similar to.

(ns main.core
  {:clj-kondo/config 
   '{:linters {:unresolved-symbol {:level :off}}}})
But for all files in some tree.

borkdude16:07:22

not yet, there's an open issue which I will address for the next release

metal 2
borkdude16:07:35

> You mean in the repl? No, for clj-kondo

pez17:07:11

Is that a no to my question? 😃

pez17:07:10

> if there is a chance a config could be added to make clj-kondo treat b as part of a, or something?

borkdude17:07:44

I don't intend to support that

pez17:07:27

Pity. Then will look forward to the directory level config instead. 😃

seancorfield17:07:05

@U0ETXRFEW I'm curious how that is structured... I assume you're loading files explicitly here, not just relying on the classpath?

pez17:07:28

Yes, loading them in the repl only. It’s Fiddle files, as discussed in this podcast episode: https://clojuredesign.club/episode/014-fiddle-with-the-repl/ Personally I can ignore that the files look like christmas trees of squiggles, but ’m adding some extra support in Calva for fiddle files, and was hoping I could figure out a convenient way to remove the error messages.