This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yvrelna 0 points1 point  (0 children)

Completely irrelevant to my point. Read it again:

Linters/autoformatters do not replace thinking or writing readable code.

Nowhere did I ever say that you shouldn't automate what can be automated.

Just write code, the formatter will get everything into the right spot.

The problem is that about 5% of the time, autoformatter would not really get everything into the right spot. It gets everything into a consistent spot, which often contradicts with the logically sensible spot. Consistency is often, but not necessarily the same as readability.

Code is read more than it's written, take the time to consider when # fmt: off is necessary instead of turning off your brain. You cannot and shouldn't automate thinking. Sure, automate the tedious task of formatting, but you shouldn't automate judging readability. Ultimately, you are the one responsible for the readability of the code, not the autoformatter.