github-vet / github-vet/rangeloop-pointer-findings
praparn/kubernetes_201907: WorkShop_2.10_Monitor/prometheus-operator/vendor/github.com/improbable-eng/thanos/pkg/block/index.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [praparn/kubernetes_201907](https://www.github.com/praparn/kubernetes_201907) at [WorkShop_2.10_Monitor/prometheus-operator/vendor/github.com/improbable-eng/thanos/pkg/block/index.go](https://github.com/praparn/kubernetes_201907/blob/309486c01dfaa48464c7dce2ac5ec6742df92eef/WorkShop_2.10_Monitor/prometheus-operator/vendor/github.com/improbable-eng/thanos/pkg/block/index.go#L473-L487)
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 c is reassigned at line 485
[Click here to see the code in its original context.](https://github.com/praparn/kubernetes_201907/blob/309486c01dfaa48464c7dce2ac5ec6742df92eef/WorkShop_2.10_Monitor/prometheus-operator/vendor/github.com/improbable-eng/thanos/pkg/block/index.go#L473-L487)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for _, c := range chks {
for _, ignoreChkFn := range ignoreChkFns {
ignore, err := ignoreChkFn(mint, maxt, last, &c)
if err != nil {
return nil, errors.Wrap(err, "ignore function")
}
if ignore {
continue OUTER
}
}
last = &c
repl = append(repl, c)
}
```
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: 309486c01dfaa48464c7dce2ac5ec6742df92eef
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.