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

Reporting multiple warnings from a single node #2

Open
quasilyte opened this issue Aug 26, 2018 · 0 comments
Open

Reporting multiple warnings from a single node #2

quasilyte opened this issue Aug 26, 2018 · 0 comments

Comments

@quasilyte
Copy link
Owner

Given this code:

// (A)
var x, y int
// (B)
var x int
var y int

Suppose we're going to try to match the (B) sequence.
The only way to do that is inspecting *ast.BlockStmt. But that block statement may contain several occurrences of that sequence. There is currently no way to give multiple warnings from a single node.

Either there should be a separate matcher API, or generic matcher interface must be re-designed to cover this case.

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

1 participant