3 ms·
I'm not really following you. It's very common for linters to flag stylistic and formatting issues.
by mbell 13y ago
I'm not really following you. It's very common for linters to flag stylistic and formatting issues.
- sliverstorm 13y agoAh well, perhaps it's just a difference in experience. I've never used a linter (there are countless linters) that fixed indentation, arranged if statements, and inserted newlines to wrap long lines. Nor has a formatter ever helped me find the sort of issues I use a linter to find.
- maw 13y agoThere is overlap. I once lost a fair amount of time because some dimwit predecessor thought putting anything other than a space after commas was acceptable. (It sounds ridiculous but it's true. I can explain if you care.) So: a formatter will, for example, make sure your lines are indented to some standard amount of indentation, a linter will bitch if they are not, and both the formatter and the linter should DTRT when they identify certain indefensible coding practices.
- he_the_great 13y agoI wouldn't want to reach for lint to handle formatting, that is what indent is for. That is to say, lint should not complain that the if should contain a space before the (.
- maw 13y agoI agree in that case, but when it comes to commas, using spaces in a certain way is objectively better.