logoalt Hacker News

chriswarbo • today at 7:09 PM • 0 replies • view on HN

AFAIK parinfer requires a specific amount of indentation for each line. That's fine for those who don't mind its rules (and vibe-coders who never see the code anyway!), but it's an all-or-nothing approach, at the exclusion of anything else (like, say, this Sift tool).

I like parenmedic because it only checks relative changes compared to some previous line, i.e. one of:

- Indentation should be greater than the previous line (if some number of parens were left open)

- Indentation should be less than the previous line (if some number of parens were closed off)

- Indentation should be equal to that of the previous sibling (if there is one)

That's a lot more forgiving of different styles and tooling, whilst still being more informative than e.g. Emacs's `check-parens`.

EDIT: Based on the sibling comment I think I maybe misunderstood parinfer... https://news.ycombinator.com/item?id=50749574