Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If those checks are present I would disable them.

The purpose of linters on a team - so I've been told - is so that no one has to argue about formatting anymore.

So now we just get to argue about what rules we can enable/disable?

Even though it's perfectly legal to disable linting for lines or files, most of the time when I do it, it's flagged by someone in review, and there's some discussion and I'm forced to rewrite and remove my disable and go back to whatever the linter was forcing. "These rules are there for a reason, and were put together by people with more experience and smarter than us - we shouldn't go disabling things whenever we want just because we don't like them or think we know better". (amalgamation of multiple comments from people stopping me disabling lint checks in specific situations).

This doesn't happen every time, but enough that the occasional 'disable' isn't something I can just do without worrying it will end in multiple hour discussions. Which is probably what people want - unquestioning conformity to "the one true way".



> The purpose of linters on a team - so I've been told - is so that no one has to argue about formatting anymore.

Code formatting is just one feature a linter may have (e.g. shellcheck[1] and pyflakes[2] are definitely linters but don't have code formatting checks).

I disable all the formatting checks in my linters because if I want to enforce a formatting standard, a code reformatter is probably a better way to do it.

1: https://www.shellcheck.net/

2: https://pypi.org/project/pyflakes/


> The purpose of linters on a team - so I've been told - is so that no one has to argue about formatting anymore.

People who argue this are, I believe, missing the forest for the trees. A short on-the-spot version of something I've had in mind for a long time:

almost everyone has a slightly different style that they fall into and the individual styles arent necessarily difficult to understand

AT LEAST WHEN USED ON THEIR OWN, AND NOT MIXED WITH OTHER STYLES.

Your Brain Adapts To A Given One, When Reading That Style. It May Still Feel Like Stuttering, But Once Adapted It's Fully Readable.

Evensomeonewithareallybizarrestylecanbereadwithalittleefforttofigureoutwhatthatstyleis.

The problemcomeswhen You have MULTIPLE people OnA team, and THE SYLES getallmixedupsoittakes a lot moreefforttofigureoutwhatTHEFUCKisgoingon.

Linting is all about picking a style and sticking with it so the code doesn't end up with multiple personality disorder.

> Even though it's perfectly legal to disable linting for lines or files, most of the time when I do it, it's flagged by someone in review, and there's some discussion and I'm forced to rewrite and remove my disable and go back to whatever the linter was forcing. "These rules are there for a reason, and were put together by people with more experience and smarter than us - we shouldn't go disabling things whenever we want just because we don't like them or think we know better". (amalgamation of multiple comments from people stopping me disabling lint checks in specific situations).

When this happens, I think it should open a wider team conversation about whether that particular rule is actually worthwhile, or whether it goes against what your team wants and should be altered/disabled. Unfortunately, I have encountered a couple rules where the linter wasn't configurable enough to get what we wanted as a team, so there's definitely reason to allow per-instance disabling...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: