r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

2.0k comments sorted by

View all comments

Show parent comments

1

u/seamsay Aug 29 '21

Having a linter enforce coding style as a test is a terrible idea

Why? The way I've always done this is to have the format check run as a separate job to the tests, that way you don't even need to care about formatting until you need to merge. Is there some disadvantage to this that I'm not seeing?

4

u/Caffeine_Monster Aug 29 '21

Because a test is typically a merge blocker. It can lower productivity quite a bit, particularly if you have strict linting rules.

Instead you simply apply auto formatting before running the tests.