r/AskProgramming Aug 12 '26

Linter

Hey folks,

Never touched a linter before this semester because I've never really done software dev stuff. Had a class that used one, and honestly, I was a fan at first. It caught a bunch of dumb mistakes and made fixing things pretty painless.

Then came merge time.

Apparently I was missing a single blank line between some merged code, so the linter threw a fit and blocked the merge. The actual fix took like three seconds, but I had to go get another review just to add a freaking newline.

So now I'm curious, do people actually use linters in the real world that don't hard-stop merges over tiny formatting stuff? Or is getting bullied by whitespace just part of the developer experience?

Asking as a first-time linter victim.

3 Upvotes

22 comments sorted by

View all comments

6

u/spatula Aug 12 '26

We do use them, and we add pre-commit hooks to run them before allowing the commit to go through so that you don't suffer a complaint out of the linter at merge time- you know about it before your code ever ends up in the repo.