Skip to content

Named return values not reported #13

Description

@cornfeedhobo

Try this out

package main

import (
	"errors"
)

func somethingDangerous() error {
	return errors.New("fake err")
}

func run() (err error) {
	err = somethingDangerous()
	return
}

func main() {
	if err := run(); err != nil {
		println(err)
	}
}

You'll see that wrap check does not detect that err is not being wrapped.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions