News for hackers. Stuff that matters.
Re:Revive – Fast, configurable, extensible linter for Go by twblalock on Friday June 01, 2018 @11:57PM (#17212579)
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.

Re:Revive – Fast, configurable, extensible linter for Go by mgechev on Saturday June 02, 2018 @01:24AM (#17212886)
Excellent 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.

Re:Revive – Fast, configurable, extensible linter for Go by _ph_ on Saturday June 02, 2018 @02:49AM (#17213146)
No, please not! It is a feature of the Go compiler, that it does not produce warnings.