github-vet / github-vet/rangeloop-pointer-findings
argoproj/argo-rollouts: test/fixtures/common.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [argoproj/argo-rollouts](https://www.github.com/argoproj/argo-rollouts) at [test/fixtures/common.go](https://github.com/argoproj/argo-rollouts/blob/1c93ebc75131adde85c1086e4a5458e6f666372c/test/fixtures/common.go#L176-L190)
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 arun is reassigned at line 181
[Click here to see the code in its original context.](https://github.com/argoproj/argo-rollouts/blob/1c93ebc75131adde85c1086e4a5458e6f666372c/test/fixtures/common.go#L176-L190)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for i, arun := range aruns.Items {
if arun.Labels[rov1.RolloutTypeLabel] != rov1.RolloutTypeStepLabel {
continue
}
if latest == nil {
latest = &arun
continue
}
if arun.CreationTimestamp.After(latest.CreationTimestamp.Time) {
latest = &aruns.Items[i]
}
if arun.CreationTimestamp.Equal(&latest.CreationTimestamp) {
c.log.Warnf("Found multiple inline analysis runs with same creationTimestamp: %s, %s", arun.Name, latest.Name)
}
}
```
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: 1c93ebc75131adde85c1086e4a5458e6f666372c
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.