4 ms·
I understand the use of linters in interpreted languages. But I'd rather see this kind of stuff done as compiler warnings in compiled languages. Ideally, one c
by twblalock 8y ago
I understand the use of linters in interpreted languages. But I'd rather see this kind of stuff done as compiler warnings in compiled languages.
Ideally, one could configure the compiler to treat specified warnings as errors and fail the build if they are fired.
- mgechev 8y agoExcellent point! The type systems verify programs' correctness based on given specification. On the other hand, we have formatters. Gofmt does a great job in formatting source code so it's consistent and easy to read. Somewhere between code formatting and type checking, there's another area which unfortunately doesn't fit in any of these two categories. For example, enforcement of style-related practices fits here but it doesn't necessarily take the entire space. That's a broad spectrum. Revive let you develop rules which can use the Go's type system to provide style suggestions with a confidence level (just like golint), or even domain-specific rules which aim to automate other parts of the code-review process. Such rules will often produce warnings (suggestions to developers), rather than compile-time errors.
- _ph_ 8y agoNo, please not! It is a feature of the Go compiler, that it does not produce warnings.
- deleted 8y ago[deleted]