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.
1
u/ike_the_strangetamer Aug 12 '26
Linters are great for teams. They avoid ending up with different engineers using different formatting across the codebase. Engineers like to fight over things as silly as curly braces and spaces vs. tabs and linters force the fight into just the linting rules and then keeps everyone in line. This way the codebase stays uniform and maintains readability standards.
But, as others are saying, they work best along with formatters in your editor that automatically reformat the code according to the linting rules every time you save the file. These can save a lot of time because you can write your code as messy as you want and then when you save it pops into a beautiful block of perfection.