github-vet / github-vet/rangeloop-pointer-findings
warpfork/pogo: gosh/sh.go; 14 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [warpfork/pogo](https://www.github.com/warpfork/pogo) at [gosh/sh.go](https://github.com/warpfork/pogo/blob/62a535ff8f053db421c6669b3df8c2b684f6e022/gosh/sh.go#L57-L70)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first
issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to rarg was used in a composite literal at line 68
[Click here to see the code in its original context.](https://github.com/warpfork/pogo/blob/62a535ff8f053db421c6669b3df8c2b684f6e022/gosh/sh.go#L57-L70)
Click here to show the 14 line(s) of Go which triggered the analyzer.
```go
for _, rarg := range args {
switch arg := rarg.(type) {
case string:
cmdt.bakeArgs(arg)
case Env:
cmdt.bakeEnv(arg)
case ClearEnv:
cmdt.clearEnv()
case Opts:
cmdt.bakeOpts(arg)
default:
panic(IncomprehensibleCommandModifier{wat: &rarg})
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 62a535ff8f053db421c6669b3df8c2b684f6e022
Contributor guide
No contributing guide indexed for this repository
Research direction
Review gosh/sh.go lines 57-70 and the linked commit, then inspect how IncomprehensibleCommandModifier uses wat in relation to the analyzer report. Done means deciding whether this is a bug, mitigated, or desirable behavior and leaving the corresponding reaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100