clj-kondo

2025-03-07T04:01:25.985729Z

Is there a linter to flag unnecessary parens, like (-> x (fizz) (:foo) (first) (frob))?

Darin Douglass 2025-03-07T10:35:45.355819Z

That’s funny because if there was a linter for this, I’d want it to do the opposite and flag optional parens that’s are MISSING

πŸ‘ 1
πŸ™‚ 3
1
2025-03-07T13:33:39.270909Z

The https://github.com/bbatsov/clojure-style-guide?tab=readme-ov-file#threading-macros-and-optional-parentheses them, but as long as the project is consistent I could see options to go either way.

πŸ‘ 1
Darin Douglass 2025-03-07T13:39:34.458319Z

imo this is one of the cases where clojure (and the style guide) gets it wrong πŸ˜•

2025-03-07T14:03:51.408139Z

I agree with the guide, but to each their own. Back to the original question, is there such a linter option? I read through the docs but don't see one.

Darin Douglass 2025-03-07T14:10:31.343019Z

ya i'm not seeing one either, sorry πŸ˜•

πŸ‘ 1
valerauko 2025-03-11T00:52:02.046939Z

cljfmt might have something for that?

daveliepmann 2025-03-11T09:04:55.462139Z

> this is one of the cases where clojure (and the style guide) gets it wrong this kind of thing is why i wish "the" style guide wasn't named such that it sounds like an official one true way. (sorry to continue the derail, Mark)