github-vet / github-vet/rangeloop-pointer-findings
SheimyRahman/pacgo-traduzido-pt-br: passoxx/chaser.go; 9 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [SheimyRahman/pacgo-traduzido-pt-br](https://www.github.com/SheimyRahman/pacgo-traduzido-pt-br) at [passoxx/chaser.go](https://github.com/SheimyRahman/pacgo-traduzido-pt-br/blob/6613c30d0075d01f992d18c3f012d6a315d3ba43/passoxx/chaser.go#L117-L125)
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 k is reassigned at line 119
[Click here to see the code in its original context.](https://github.com/SheimyRahman/pacgo-traduzido-pt-br/blob/6613c30d0075d01f992d18c3f012d6a315d3ba43/passoxx/chaser.go#L117-L125)
Click here to show the 9 line(s) of Go which triggered the analyzer.
```go
for k := range pf.open {
if min == nil {
min = &k
continue
}
if pf.table[k].Cost() < pf.table[*min].Cost() {
min = &k
}
}
```
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: 6613c30d0075d01f992d18c3f012d6a315d3ba43
Contributor guide
No contributing guide indexed for this repository
Research direction
Read passoxx/chaser.go at lines 117-125 and the linked commit, then check the reported Go range-loop pointer behavior. Done means deciding whether the analyzer finding is a Bug, Mitigated, or Desirable Behavior and leaving the corresponding reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100