Fork me on GitHub

@lee It's interesting that so far nobody has asked for this. Also it's a relative new feature in joker (a couple of years after people having used it). I really wonder if it's a good idea. I posted a Tweet about it: Let's see what others think too.


I personally lean towards: if you do it for documentation only, use other means


i think the spec alternative may be more attractive once it actually isn't alpha 🙂


Maybe the people who employ unused destructured keys for docs are not using clj-kondo yet? Even if the community unanimously agrees this practice is a bad (or questionable), clj-kondo still might be gracious and offer an option to ignore this specific practice to allow folks to transition to an alternative style at their own pace.


Of course this graciousness is not free, someone has to implement and then maintain it!


> I never destructure :keys just for documentation; the alternatives you mentioned both sound better. I do often add the :as part without using it, but i'm sure there is no perf penalty in that case.


I've started using clj-kondo with flycheck, and there are places where the destructuring :keys are reported as unused bindings where they are basically documentation. They are more reminders to me, and I may use them on the inner expressions at some point. Some I've removed, but some I just leave. When I leave them it's nice to have the unused ones just underlined for me. So even if it is a form of documentation, when it's editor integrated like this, it's nice to have it highlighted. Just because a linter marks it, doesn't mean I have to alter it. So I like it the way it is. I can see how it might be annoying from the command line, but inside the editor it's kind of nice. Maybe for people using this as a form of documentation/reminder could consider using an editor integration?


You can also switch to :arglists for the functions that need docs


@borkdude, current release of clj-kondo is having difficulty with clj-kondo returns: test/cljdoc/util_test.clj:0:0: error: can't parse test/cljdoc/util_test.clj, Invalid symbol: org/clojure/math.numeric-tower. I can easily work around this for my purposes but I thought you’d like to know. Happy to raise a git issue if one is merited.


@lee issue would be fine


you'll probably also run into this one with rewrite-cljc, as this is a tools.reader issue


I have hacked around this for some other issue, I think it was a similar one for keywords


thanks, I shall make a note of that!


wooo! :analysis = import-vars smart?


is there a straight-forward way to figure out the full path of the file that corresponds to a particular namespace?


hi @sogaiu! with regards to analysis?