This repository has been archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 492
False positives with custom errors-package and errors.New(fmt.Sprintf(... #350
Comments
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Dec 5, 2017
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 1, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 1, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
leonelquinteros
added a commit
to leonelquinteros/lint
that referenced
this issue
Mar 5, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using a custom errors-package implementing
New(...)
in conjunction withfmt.Sprintf(...)
golint incorrectly suggests usage offmt.Errorf(...)
instead.A custom errors-package will most likely return an error of different type than "errorString" of the core errors-package and hence
fmt.Errorf(...)
will not be equivalent.Sample code:
Output:
Expected:
No warnings
The text was updated successfully, but these errors were encountered: