tools
                                
                                 tools copied to clipboard
                                
                                    tools copied to clipboard
                            
                            
                            
                        go/analysis: enable change ssa.BuilderMode on buildssa Analyzer
Hello👋
This PR proposes to enable change ssa.BuilderMode on buildssa Analyzer.
Since there is currently no way to change BuilderMode, I created a public function CreateRunner so that it can replace buildssa.Analyzer.Run.
The original comment stated the following
// Some Analyzers may need GlobalDebug, in which case we'll have // to set it globally, but let's wait till we need it.
The static analyzer I'm developing, wastedassign, needed to use ssa.NaiveForm mode.
With the variety of great static analysis tools being developed, I think it should be possible to change the mode.
It's time to enable to set mode globally.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.
What to do if you already signed the CLA
Individual signers
- It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
- Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
- The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
- The email used to register you as an authorized contributor must also be attached to your GitHub account.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
This PR (HEAD: 1fce5fd24e8197842b138df40d7d7c01f405e68c) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/tools/+/284219 to see it.
Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info
Message from Go Bot:
Patch Set 1:
Congratulations on opening your first change. Thank you for your contribution!
Next steps: A maintainer will review your change and provide feedback. See https://golang.org/doc/contribute.html#review for more info and tips to get your patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be surprising to people new to the project. The careful, iterative review process is our way of helping mentor contributors and ensuring that their contributions have a lasting impact.
Please don’t reply on this GitHub thread. Visit golang.org/cl/284219. After addressing review feedback, remember to publish your drafts!
I think this change requires more discussion. A proposal would be a good place for further discussion. Can you file a proposal for it following the steps here: https://github.com/golang/proposal#the-proposal-process on the Go issue tracker. The component for this change should be x/tools/go/analysis/passes/buildssa.
Hello @timothy-king. OK, I will submit a proposal as you suggest and have a discussion. Thanks.