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
[Go] support for select
blocks and matching cases inside of those
#2847
Comments
I think this is better (which you suggested on slack):
|
yep, agreed |
hi @hex0punk, thanks so much for creating an issue! can you share the relative priority of this for you -- is it blocking your adoption of semgrep (p0), a significant problem to using semgrep for you (p1), or a minor annoyance (p2)? playground link: https://semgrep.dev/s/Nr4L |
for sure! Priority: (p2) |
This will help semgrep/semgrep#2847 test plan: see related PR in semgrep
This closes #2847 test plan: test files included make test
This closes #2847 test plan: test files included make test
This works now on develop: https://semgrep.dev/s/nqqg/?version=develop |
Is your feature request related to a problem? Please describe.
Currently, there is no clean way to write a pattern for this:
Describe the solution you'd like
I am interested in finding where the channel send occurs, but because it occurs as a
case
inside of aselect
block, there is no way to detect that in semgrep without getting aPattern could not be parsed as a Golang semgrep pattern
errorI would like to specify a pattern like this
or even this
to detect where data is sent to a go channel as a
case
insideselect
blocksDescribe alternatives you've considered
This won't work where channel sends occur as
case
sAdditional context
This is a very common concurrency pattern in go
The text was updated successfully, but these errors were encountered: