3 ms·
Annoying that the various Go linters I have installed (`go vet`, `golangci-lint`, `gosec`) don't catch "possible use of pointer before nil-check" - you'd think
by zimpenfish 6y ago
Annoying that the various Go linters I have installed (`go vet`, `golangci-lint`, `gosec`) don't catch "possible use of pointer before nil-check" - you'd think it would be an obvious case for those to handle.
- masklinn 6y agoThat would be very annoying to use as many pointers are just assumed to be non-nil and you don't have any other option but to assume they're non-nil. Also since Go supports nil receivers, it would have to require that every "pointer method" be checked for nil. Which technically they should, but...
- zimpenfish 6y agoI'd imagine it'd be one of the "disabled by default" in `golangci-lint`, for example - helpful for when you're doing an in-depth review of the code but probably not something you want running on every CI invocation.