github-vet / github-vet/rangeloop-pointer-findings
golangci/golangci-api: pkg/worker/analyze/reporters/github_reviewer.go; 12 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [golangci/golangci-api](https://www.github.com/golangci/golangci-api) at [pkg/worker/analyze/reporters/github_reviewer.go](https://github.com/golangci/golangci-api/blob/081ecb458d4aebd2b8e390cd2de9aadf83d48f8e/pkg/worker/analyze/reporters/github_reviewer.go#L115-L126)
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 i was used in a composite literal at line 123
[Click here to see the code in its original context.](https://github.com/golangci/golangci-api/blob/081ecb458d4aebd2b8e390cd2de9aadf83d48f8e/pkg/worker/analyze/reporters/github_reviewer.go#L115-L126)
Click here to show the 12 line(s) of Go which triggered the analyzer.
```go
for _, i := range issues {
if ec.contains(&i) {
continue // don't be annoying: don't comment on the same line twice
}
comment := &gh.DraftReviewComment{
Path: gh.String(i.File),
Position: gh.Int(i.HunkPos),
Body: gh.String(gr.makeIssueCommentBody(&i, buildConfig)),
}
comments = append(comments, comment)
}
```
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: 081ecb458d4aebd2b8e390cd2de9aadf83d48f8e
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.