This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (2)
- # announcements (7)
- # beginners (74)
- # clj-kondo (23)
- # cljdoc (3)
- # cljsrn (3)
- # clojure (42)
- # clojure-android (1)
- # clojure-uk (4)
- # clojuredesign-podcast (10)
- # clojurescript (4)
- # figwheel-main (19)
- # fulcro (19)
- # hoplon (4)
- # jobs (5)
- # juxt (8)
- # off-topic (5)
- # pathom (40)
- # perun (3)
- # shadow-cljs (56)
@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: https://twitter.com/borkdude/status/1155024640231780352 Let's see what others think too.
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. https://ask.clojure.org/index.php/8214/is-keys-destructuring-for-documentation-reasons-good-style?show=8217#a8217
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?
@borkdude, current release of clj-kondo is having difficulty with https://github.com/cljdoc/cljdoc/blob/d54cb58b20d2b4cb1e7c714b3637aa8b89956ce0/test/cljdoc/util_test.clj#L28
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.
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
@lee I'm currently playing with this: https://www.dropbox.com/s/ewrpwwrj53aktt0/Screenshot%202019-07-27%2023.52.25.png?dl=0
is there a straight-forward way to figure out the full path of the file that corresponds to a particular namespace?