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

x/tools/gopls: analyzer for Fuzz #50198

Open
hyangah opened this issue Dec 15, 2021 · 4 comments
Open

x/tools/gopls: analyzer for Fuzz #50198

hyangah opened this issue Dec 15, 2021 · 4 comments

Comments

@hyangah
Copy link
Contributor

@hyangah hyangah commented Dec 15, 2021

Idea came from #46896 (comment)

f.Fuzz takes any (aka interface{}) type but the parameter must be a fuction with no return value whose first argument is *T and whose remaining arguments match the matching testin.F.Add call.

Add an analyzer to detect misuse of Fuzz API.

@hyangah
Copy link
Contributor Author

@hyangah hyangah commented Dec 16, 2021

We think this is useful outside gopls and we can consider to add this to vet in the future.

@timothy-king
Copy link
Contributor

@timothy-king timothy-king commented Dec 16, 2021

Roughly a dup of #46218. The suggestion for putting this into go/analysis/passes/tests/tests.go is a good one. The only real reason I can see to delay going into cmd/vet is that cmd/vet is under code freeze ATM.

@findleyr
Copy link
Contributor

@findleyr findleyr commented Dec 21, 2021

Let's close this as a dupe. We can start #46218 in gopls, but I think it eventually belongs in vet.

@findleyr findleyr closed this Dec 21, 2021
@findleyr
Copy link
Contributor

@findleyr findleyr commented Jan 4, 2022

Err, as I'm putting together gopls@v0.8.0 planning, I think it would be nice to have a tracking issue for just the gopls part of this. Reopening.

@findleyr findleyr reopened this Jan 4, 2022
@findleyr findleyr removed this from the gopls/on-deck milestone Jan 4, 2022
@findleyr findleyr added this to the gopls/v0.8.0 milestone Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants