Fork me on GitHub
#clj-kondo
<
2021-06-24
>
Joshua Suskalo17:06:11

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

Joshua Suskalo17:06:19

Oh, nvm, I figured it out

Joshua Suskalo17:06:19

Do transducers work as intended in sci?

Joshua Suskalo17:06:48

I'm getting some very strange behavior

Joshua Suskalo17:06:45

I was shadowing something.

Joshua Suskalo19:06:54

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

Joshua Suskalo19:06:22

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

borkdude19:06:00

@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.

Joshua Suskalo19:06:18

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)

borkdude19:06:41

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

Joshua Suskalo19:06:54

Yeah, that looks great to me. 🙂

borkdude19:06:34

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

borkdude19:06:46

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

Joshua Suskalo19:06:13

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

borkdude19:06:53

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

Joshua Suskalo19:06:07

Oh interesting, I didn't know that.

Joshua Suskalo19:06:13

I guess I'd never tried it before.