clj-kondo

https://github.com/clj-kondo/clj-kondo
borkdude 2020-08-02T14:06:32.265800Z

I wonder how useful people would find a linter that warns if you shadow a var with a local name. I fear that people would be interested initially, but after a while, they would turn it off because it's so common to call a local e.g. val or key.

vemv 2020-08-04T01:29:21.273800Z

I find it definitely useful, Eastwood does it (and without issues other than its usual relative slowness) In specific legacy projects it's unfeasible to retrofit things though Also occasionally it's very hard to come up with a good local name that doesn't shadow the defn it comes from

practicalli-john 2020-08-02T16:15:53.266100Z

I would find it useful to have a linter that highlights local names shadowing vars, but then I strive for highly readable code as meaningless names are quite difficult for me to work with.

borkdude 2020-08-02T16:20:08.266500Z

I have trouble parsing the first half of that sentence

practicalli-john 2020-08-02T16:45:11.266800Z

Fixed...

borkdude 2020-08-02T16:48:19.267Z

:thumbsup:

seancorfield 2020-08-02T21:48:24.267200Z

I would find it very helpful, as long as I could turn it off for certain symbols on a per-namespace basis.

seancorfield 2020-08-02T21:49:44.267400Z

For example, I have a couple of namespaces where I want function arguments and let bindings to use name but in general I would want a linter to tell me not to do that.