What does HackerNews think of golangci-lint?

Fast linters Runner for Go

Language: Go

#58 in Go
#41 in Go
Glad I could help!

In general, I recommend using golangci-lint[0], which aggregates a ton of useful linters like this one.

[0]: https://github.com/golangci/golangci-lint

Use golangci-lint (https://golangci-lint.run, https://github.com/golangci/golangci-lint) which combines all of the best lints (including staticcheck).
There are tools for Go that detect non-optimal struct alignment. I use golangci-lint, available at: https://github.com/golangci/golangci-lint

The struct alignment linter is not included by default. To enable it, run the linter with this command: golangci-lint run --enable maligned

> Able to have the confidence that we're checking for every situation that could occur on an enum type across the codebase is one less thing I need to worry about.

golangci-lint (https://github.com/golangci/golangci-lint) is an absolute must, and includes https://github.com/nishanths/exhaustive which will check this for you.

I’m not sure the mentality is exactly “oops, oh well, leave it broken forever” [0]; it is intentionally ponderous. As a stop-gap, linters [1] can get excellent insight from ASTs.

The stability of Go is something I value a lot, so I don’t mind stop-gaps like this too much on balance.

[0] https://github.com/golang/go/issues/20148

[1] https://github.com/golangci/golangci-lint