Fork me on GitHub
#clj-kondo
<
2023-08-18
>
tomd19:08:10

What do folks think of a linter for non-double-wrapped anonymous function forms in thread-first constructs? I expect it's so rare that anyone wants to thread a value into the name slot of a function that it can safely be a lint error (maybe optional). Got the idea from a question in #beginners just now. E.g.

(-> foo (fn [x] (bar x)))
I'd wager no one has ever done this on purpose.

🎯 4
tomd19:08:02

As in, you'd use the linter, or you'd use that syntax purposefully (I assume the former 😅 )

Noah Bogart19:08:10

haha the linter

😄 2
Noah Bogart19:08:38

it took me a while to get used to (-> ... (#(...)))

tomd19:08:48

Yeah likewise

tomd17:08:06

fwiw, I made an issue and linked a PR, here: https://github.com/clj-kondo/clj-kondo/issues/2159

👍 4