clj-kondo

https://github.com/clj-kondo/clj-kondo
2021-06-24T17:30:11.271100Z

In the hooks, is there a way to get access to the children of a vector node?

2021-06-24T17:32:19.271400Z

Oh, nvm, I figured it out

2021-06-24T17:47:19.271700Z

Do transducers work as intended in sci?

2021-06-24T17:47:48.271900Z

I'm getting some very strange behavior

2021-06-24T17:54:40.272500Z

Oh never mind.

2021-06-24T17:54:45.272700Z

I was shadowing something.

2021-06-24T19:25:54.274100Z

Hey @borkdude have you thought about making the shadowed-var linter have configuration to include all the clojure vars? I'd like to turn on shadowed-var, but only for clojure.core

2021-06-24T19:26:22.274600Z

Or potentially the configuration would allow specifying namespaces, and not just individual vars.

borkdude 2021-06-24T19:50:00.275300Z

@suskeyhose yeah, I think specifying namespaces would be the more flexible option. For clojure.core the linters.md doc sugggests also: > To avoid shadowing core vars you can also use :refer-clojure + :exclude in the ns form.

2021-06-24T19:51:18.276800Z

Yeah, I'm aware of that and use it in some of my code, but sometimes I forget that I'm shadowing core when I write something and then stuff breaks when I try to use the version from clojure core (or worse it works when I use the cider debugger because the debugger searches for vars for things in function call position even if those symbols are shadowed, but it doesn't work otherwise)

borkdude 2021-06-24T19:52:41.277700Z

ok, we can have :include [clojure.core] and you can unblock things with :exclude [ns] for example?

2021-06-24T19:52:54.277900Z

Yeah, that looks great to me. 🙂

borkdude 2021-06-24T19:54:34.278600Z

hmm, that probably won't work, since :include right now expects simple symbols which are the var names that are shadowed by a binding

borkdude 2021-06-24T19:54:46.279Z

so we'll have to make a separate key for it, like :namespaces [...]

2021-06-24T19:55:13.279600Z

Yeah, that makes sense, otherwise we'd have issues with single-segment nses or people who make vars with dots

borkdude 2021-06-24T19:55:53.280100Z

actually only the first since you can't have bindings with dots, so you can't shadow vars with dots

2021-06-24T19:56:07.280300Z

Oh interesting, I didn't know that.

2021-06-24T19:56:13.280500Z

I guess I'd never tried it before.