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 messages with using of github.com/pkg/errors #12

Closed
Dentrax opened this issue Apr 3, 2021 · 1 comment
Closed

false positive messages with using of github.com/pkg/errors #12

Dentrax opened this issue Apr 3, 2021 · 1 comment

Comments

@Dentrax
Copy link

Dentrax commented Apr 3, 2021

This code causes a false-positive error:

import "github.com/pkg/errors"


func FooFunc() err {
 b, err := BarFunc()
 if err != nil {
  return errors.Wrap(err, "this line causes: error returned from external package is unwrapped")
 }
}

func BarFunc() (bool, err) {
 // ...
}

Version: golangci-lint has version 1.39.0 built from 9aea4aee on 2021-03-26T08:02:53Z

@tomarrell
Copy link
Owner

tomarrell commented Apr 7, 2021

Hi Dentrax,

This has already been resolved in the v1.1.0 release of this linter, specifically covering github.com/pkg/errors. The update has been merged into master of golangci-lint as well and will be released in the v1.40.0.

Regarding making it more generic and configurable, this will be tracked as part of #8

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants