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

cmd/vet: add hook for file level checker short-circuits #8338

Open
josharian opened this issue Jul 8, 2014 · 3 comments
Open

cmd/vet: add hook for file level checker short-circuits #8338

josharian opened this issue Jul 8, 2014 · 3 comments
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Performance
Milestone

Comments

@josharian
Copy link
Contributor

Some vet checks could be short-circuited at the file level. For example, the unsafe
pointer checker could avoid running if unsafe has not been imported. Something similar
holds for the atomic check, the cyclic finalizer test, and the template check (if it
goes in). The asm check could probably be run only on .s files.
@josharian
Copy link
Contributor Author

Comment 1:

I ran a quick test that short-circuits the atomic and unsafe checks at the file level.
Those are the only clear file-level wins available at tip. It cut 3.5% off wall clock
time, so not high priority.
The implementation needs more thought; vet's structure is complicated already.

@dsymonds
Copy link
Contributor

Comment 2:

Labels changed: added performance.

@josharian
Copy link
Contributor Author

For future reference, the quick test referred to above is at https://codereview.appspot.com/106510044/. (I don't plan to migrate it to Gerrit but want others to be able to find it in the future if they want.)

@mikioh mikioh changed the title go.tools/cmd/vet: add hook for file level checker short-circuits cmd/vet: add hook for file level checker short-circuits Jan 10, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/vet: add hook for file level checker short-circuits x/tools/cmd/vet: add hook for file level checker short-circuits Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@mvdan mvdan changed the title x/tools/cmd/vet: add hook for file level checker short-circuits cmd/vet: add hook for file level checker short-circuits May 31, 2018
@adonovan adonovan added the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Performance
Projects
None yet
Development

No branches or pull requests

4 participants