Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False-positive for anonymous functions #17

Open
r2k1 opened this issue Jul 28, 2021 · 2 comments
Open

False-positive for anonymous functions #17

r2k1 opened this issue Jul 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@r2k1
Copy link
Contributor

r2k1 commented Jul 28, 2021

Wrapcheck throws an error for the next case:

import "errors"

func Test_AnonFunc(t *testing.T) {
	test := func() error {
		return errors.New("test")
	}
	fmt.Println(test())
}

error returned from external package is unwrapped: sig: func errors.New(text string) error

@r2k1 r2k1 mentioned this issue Jul 28, 2021
@tomarrell tomarrell added the bug Something isn't working label Jul 29, 2021
@tomarrell
Copy link
Owner

Thanks for the report. Will have a look when I get some time.

@hsommerlandreason
Copy link

Bump on this. it is driving me a bit crazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants