Closed justinsb closed 1 year ago
Looking at the list the only one I think is important is the one @karlkfi identified (refreshCreds). The touch
errcheck warning is test code. The io.WriteString
is writing to a hasher which I believe is documented to never fail.
This is just the default set of linters, there could well be others in the not-enabled-by-default linters. If there are any recent bugs (that a linter could have caught) I can see if they would have been caught.
In short, yes, I'd be happy with more lint-free code.
The signal
one seems like a mistake, and touch
is suspect to me.
Inspired by #775 I was wondering why the linter didn't catch the error (or warn us about it). Turns out checking for unhandled errors does not have consensus, and is thus not implemented in
go vet
.But we could turn on
golangci-lint
- other k8s subprojects do use it.Here's the current output with the default configuration: