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

Feature/deal with swtch stmt #2

Merged
merged 6 commits into from Mar 22, 2019

Conversation

Projects
None yet
2 participants
@Matts966
Copy link

commented Mar 7, 2019

fix #1

@@ -50,7 +70,56 @@ func run(pass *analysis.Pass) (interface{}, error) {
return
}

pass.Reportf(node.Pos(), "do not compare error with \"==\" or \"!=\"")

This comment has been minimized.

Copy link
@Matts966

Matts966 Mar 7, 2019

Author

Tests didn't pass in my local environment maybe because the format of the report.

var causeFuncs = []string{
"TestCauseFunc", // For test

"github.com/pkg/errors.Cause",

This comment has been minimized.

Copy link
@sachaos

sachaos Mar 14, 2019

Owner

I want to focus on xerrors only, in this project.
So please remove this one.

This comment has been minimized.

Copy link
@Matts966
var errType = types.Universe.Lookup("error").Type().Underlying().(*types.Interface)

var causeFuncs = []string{
"TestCauseFunc", // For test

This comment has been minimized.

Copy link
@sachaos

sachaos Mar 14, 2019

Owner

We can test with xerrors.Unwrap.
So please remove this one.

This comment has been minimized.

Copy link
@Matts966

@sachaos sachaos merged commit f193773 into sachaos:master Mar 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.