github-vet / github-vet/rangeloop-pointer-findings
MorganR/KenkenSolver: region.go; 8 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [MorganR/KenkenSolver](https://www.github.com/MorganR/KenkenSolver) at [region.go](https://github.com/MorganR/KenkenSolver/blob/bd6f6c6f7e2d19e54ab0ef04f3d8b900f5fbfa1e/region.go#L153-L160)
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.
> function call at line 156 may store a reference to innerMap
[Click here to see the code in its original context.](https://github.com/MorganR/KenkenSolver/blob/bd6f6c6f7e2d19e54ab0ef04f3d8b900f5fbfa1e/region.go#L153-L160)
Click here to show the 8 line(s) of Go which triggered the analyzer.
```go
for _, innerMap := range *il {
innerMap = innerMap.Copy()
innerMap.Add(v)
if l.Contains(&innerMap) {
continue
}
*l = append(*l, innerMap)
}
```
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: bd6f6c6f7e2d19e54ab0ef04f3d8b900f5fbfa1e
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.