github-vet / github-vet/rangeloop-pointer-findings
travelgateX/presenters-benchmark: pkg/presenter/gophers/resolver/markup.go; 3 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [travelgateX/presenters-benchmark](https://www.github.com/travelgateX/presenters-benchmark) at [pkg/presenter/gophers/resolver/markup.go](https://github.com/travelgateX/presenters-benchmark/blob/cc58ba3aab3334860801f5ef2b5d5e65f8c07617/pkg/presenter/gophers/resolver/markup.go#L38-L40)
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 rule was used in a composite literal at line 39
[Click here to see the code in its original context.](https://github.com/travelgateX/presenters-benchmark/blob/cc58ba3aab3334860801f5ef2b5d5e65f8c07617/pkg/presenter/gophers/resolver/markup.go#L38-L40)
Click here to show the 3 line(s) of Go which triggered the analyzer.
```go
for _, rule := range r.Markup.Rules {
resolvers = append(resolvers, &RuleResolver{&rule})
}
```
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: cc58ba3aab3334860801f5ef2b5d5e65f8c07617
Contributor guide
No contributing guide indexed for this repository
Research direction
Read pkg/presenter/gophers/resolver/markup.go at lines 38-40 and inspect how RuleResolver uses the referenced rule. Check whether the range-loop reference can point to the wrong value, then validate the analyzer finding against the repository code. Done means leaving the appropriate Bug, Mitigated, or Desirable Behavior 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
- Clearly specified
- Newbie friendliness
- 45/100