2 ms·
Annotate the long line to ignore that particular linter rule. This makes it clear that it's not because the coder was lazy, ignorant, etc.
by pas 6y ago
Annotate the long line to ignore that particular linter rule. This makes it clear that it's not because the coder was lazy, ignorant, etc.
- zeroimpl 6y agoWouldn’t that make the code less readable? I think the point is that if 98% of your code fit under 110 chars when you weren’t using a linter, then maybe you don’t need a linter checking line length.
- pas 6y agoYou can disable the max line length rule too. I find linters helpful. Just yesterday it helped me catch a serious bug in Python. After fixing all linter warnings. The last one was a unused variable. Turns out it should have been used. Sure, the line length is not as severe as a unused var, but that's why the important thing is to have a systematic approach to thinking about maybe-problems that the "compiler" doesn't care about.