-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
AnalysisIssues related to static analysis (vet, x/tools/go/analysis)Issues related to static analysis (vet, x/tools/go/analysis)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
As of 4874f863, the nilness check doesn't seem to trigger on fmt.Errorf calls with an error that is proven nil. Example:
func f() error {
exists, err := g()
if err != nil {
return errors.Wrap(err, "error1")
}
if !exists {
return fmt.Errorf("nothing: %w", err)
}
return nil
}Same with the %v verb. I feel like most people would not want to actually produce a nothing: <nil> or a nothing: %!w(<nil>) message here.
Inspired by dominikh/go-tools#529.
Metadata
Metadata
Assignees
Labels
AnalysisIssues related to static analysis (vet, x/tools/go/analysis)Issues related to static analysis (vet, x/tools/go/analysis)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.