Fork me on GitHub
#clj-kondo
<
2021-02-10
>
borkdude11:02:28

Replied in the issue

neotyk11:02:09

me also 🙂

borkdude11:02:25

I'll let the issue be open to gather feedback from the community first.

borkdude12:02:24

If this doesn't end up in clj-kondo eventually you can write a custom hook to handle cond and condp yourself

neotyk12:02:14

how would I go about writing custom hook, we’ve being bitten in our rear end few times over last days because of condp lacking default case

borkdude12:02:49

I will write a small one

neotyk12:02:34

thank you Michiel

borkdude12:02:02

np. you might have to do some more work to take into account :>>, e.g. filter it out, but if you're not using that this should already be sufficient

serioga15:02:14

Idea for linting: warn about useless -> in the code like (-> 'x). Sometimes during refactoring I remove all forms in threading macro and miss remaining macro itself.

mynomoto15:02:36

Maybe also (-> x y)

borkdude15:02:44

feel free to post an issue

serioga15:02:12

“Maybe also (-> x y)” NO!

mynomoto15:02:30

Why? That is like (y x) with extra chars.

mynomoto15:02:52

I'm not talking about when y is a form, that should be fine, but for a symbol or keyword.

serioga15:02:09

Sometime I would like to emphasize that x is more important in the context than y. Like (f a (-> b xform)). This allows me to place accents. https://clojurians.slack.com/archives/CHY97NXE2/p1612971030126000?thread_ts=1612969334.125300&amp;cid=CHY97NXE2

mynomoto15:02:52

Interesting, never thought about using it that way. Thanks.