github-vet / github-vet/rangeloop-pointer-findings
boztalay/UmichClassChecker: src/UmichClassChecker.go; 18 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [boztalay/UmichClassChecker](https://www.github.com/boztalay/UmichClassChecker) at [src/UmichClassChecker.go](https://github.com/boztalay/UmichClassChecker/blob/f433201261931db2117d4bac0043296096e67665/src/UmichClassChecker.go#L290-L307)
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.
>
[Click here to see the code in its original context.](https://github.com/boztalay/UmichClassChecker/blob/f433201261931db2117d4bac0043296096e67665/src/UmichClassChecker.go#L290-L307)
Click here to show the 18 line(s) of Go which triggered the analyzer.
```go
for i, class := range classes {
classInfo, err := loadClassInfoAndCheckValidity(context, class)
if(err == nil) {
classStatus := getClassStatusFromClassInfo(classInfo)
context.Infof("Status: ", classStatus)
if(classStatus != class.Status) {
context.Infof(" - Status changed, notifying " + class.UserEmail + "\n")
sendEmailNotificationAboutStatusChange(context, class, classStatus)
} else {
context.Infof(" - Status hasn't changed\n")
}
class.Status = classStatus
datastore.Put(context, classKeys[i], &class)
} else {
context.Infof("Error loading the info for a class: " + err.Error() + "\n")
}
}
```
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.
No path was found through the callgraph that could lead to a function which passes a pointer to third-party code.
root signature {Put 3} was not found in the callgraph; reference was passed directly to third-party code
```
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: f433201261931db2117d4bac0043296096e67665
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/UmichClassChecker.go around lines 290-307 at commit f433201261931db2117d4bac0043296096e67665. Read how the range-loop variable is passed to datastore.Put and inspect the analyzer's range-loop finding guidance. Done means classifying the finding as a bug, mitigated, or desirable behavior with a justified reaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100