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: check for code after f.Fuzz #51854

Open
suzmue opened this issue Mar 21, 2022 · 3 comments
Open

x/tools/gopls: check for code after f.Fuzz #51854

suzmue opened this issue Mar 21, 2022 · 3 comments
Labels
gopls/analysis Issues related to running analysis in gopls gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@suzmue
Copy link
Contributor

suzmue commented Mar 21, 2022

Spin-off of #50198: our analysis of Fuzz targets can be improved by checking for code after a call to f.Fuzz

This analyzer is the last of the analyzers suggested in the original vet check proposal #46218

This could also possibly be split into several analyzers to check for:

  • multiple calls to f.Fuzz
  • calls to f.Add after the call to f.Fuzz

@ansaba

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Mar 21, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 21, 2022
@findleyr findleyr modified the milestones: Unreleased, gopls/on-deck Mar 21, 2022
@zpavlinovic zpavlinovic added the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Mar 22, 2022
@zpavlinovic
Copy link
Contributor

Perhaps a silly question, assuming this will also land in go vet, should this be a separate proposal or we can just add it to #46218?

@suzmue
Copy link
Contributor Author

suzmue commented Mar 22, 2022

Not a silly question! This issue is primarily for milestone tracking for gopls development. The proposal already includes checking for code after f.Fuzz.

@zpavlinovic zpavlinovic removed the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Mar 22, 2022
@timothy-king
Copy link
Contributor

The border for whether a new type of diagnostic for an existing vet checker needs a proposal is slightly blurry. It requires a judgement call on how different it is from the existing checks and how risky it is for meeting the vet criteria. In this case, I think we are fine without a proposal as the check is very similar to the already accepted #46218 (straightforward extension in the same spirit) and the risk to fail to meet on of the vet criteria is low here.

@findleyr findleyr added the gopls/analysis Issues related to running analysis in gopls label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/analysis Issues related to running analysis in gopls gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants