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

Update error-strings rule (#608) #609

Merged
merged 2 commits into from Oct 28, 2021

Conversation

doniacld
Copy link
Contributor

@doniacld doniacld commented Oct 27, 2021

Description

Closes #608.
Adds new packages from https://pkg.go.dev/github.com/pkg/errors to error-strings rule.

I see one problem in the current implementation, this is the aliasing of imports.
I assumed projects wether use the standard library errors or github.com/pkg/errors but not both at the same time.
Anyway it could be a nice to have.

Test

I added one fixture file containing the new methods from github.com/pkg/errors.

rule/error-strings.go Outdated Show resolved Hide resolved
rule/error-strings.go Outdated Show resolved Hide resolved
rule/error-strings.go Outdated Show resolved Hide resolved
@chavacava chavacava merged commit 0fada9d into mgechev:master Oct 28, 2021
@chavacava
Copy link
Collaborator

Thanks @doniacld !

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

Successfully merging this pull request may close these issues.

rule.error-strings does not catch errors.Wrap messages
2 participants