github-vet / github-vet/rangeloop-pointer-findings
mF2C/SlaManagement: assessment/evaluator.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [mF2C/SlaManagement](https://www.github.com/mF2C/SlaManagement) at [assessment/evaluator.go](https://github.com/mF2C/SlaManagement/blob/23ace0147261a77d505584ea23ec11059eba72c1/assessment/evaluator.go#L42-L48)
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.
> function call at line 44 passes reference to agreement to third-party code
[Click here to see the code in its original context.](https://github.com/mF2C/SlaManagement/blob/23ace0147261a77d505584ea23ec11059eba72c1/assessment/evaluator.go#L42-L48)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for _, agreement := range agreements {
result := AssessAgreement(&agreement, ma, time.Now())
repo.UpdateAgreement(&agreement)
if not != nil && len(result.Violated) > 0 {
not.NotifyViolations(&agreement, &result)
}
}
```
Click here to show extra information the analyzer produced.
```
No path was found through the callgraph that could lead to a function which writes a pointer argument.
The following graphviz dot graph describes paths through the callgraph that could lead to a function which passes a pointer to third-party code:
digraph G {
"(UpdateAgreement, 1)" -> {"(update, 3)";}
"(update, 3)" -> {}
}
```
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: 23ace0147261a77d505584ea23ec11059eba72c1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.