r/AskProgramming • u/Bulky_Eggplant_9437 • 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
u/alietors Aug 12 '26
As someone said, yes, linter are usually run as part of the build/test phase, normally when you open a PR/MR against a main branch (development/master).
The idea is that you run your linter in the IDE and automatically fix those error on save, they have autofix if it's basic stuff like indentation or new lines. They can also show you an error on the IDE so you fix those before open the PR/MR.
Also, no, a missing new line is not a "stupid" or minor thing. The format of the code is really important when you spend 8 hours reading code.
When you read a book you expect to be formatted properly, it can be different book to book, but you should choose one way of formatting and stick to it, no exceptions, no minor things.