by kristiandupont · 4y ago · 0 comments
I feel that linting has a lot of potential and is currently underappreciated. You can create rules that are heavily semantic in a way that would be impossible or extremely hard using a type system. Add to that that you can give useful error messages that include links! A type system might allow you to express an invariant, but when it's broken, it can be very hard to understand and communicate what the problem (let alone the solution!) is.
Finally, like the article touches on, linter errors can easily be ignored which means that you only have to get them, say, 80% right to add value. If an error appears somewhere you don't intend, you just ignore it with a comment.
Goland devs have been doing that since the inception of the language since the standard library ships with a Go parser. It's a no brainer for modern languages.
Code reviews shouldn't be spent catching formatting errors or naming conventions and coding guideline enforcement should be fully automated on a continuous integration server.