Skip to content

a nilnesserr linter idea #4

@alingse

Description

@alingse

use nilness to enhance the nilerr linter

the common case

err := do()
if err != nil {
   return err
}
err2 := do2()
if err2 != nil {
   return err // which is a nil value err, should be `return err2`
}

Real bugs

False-Positive

see alingse/nilnesserr#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions