github-vet / github-vet/rangeloop-pointer-findings
2kranki/genapp: pkg/genSqlAppGo/dbJson/dbJson.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [2kranki/genapp](https://www.github.com/2kranki/genapp) at [pkg/genSqlAppGo/dbJson/dbJson.go](https://github.com/2kranki/genapp/blob/6d592b33436c7a0c636d619243a1f34819e87a01/pkg/genSqlAppGo/dbJson/dbJson.go#L928-L934)
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 t is reassigned at line 930
[Click here to see the code in its original context.](https://github.com/2kranki/genapp/blob/6d592b33436c7a0c636d619243a1f34819e87a01/pkg/genSqlAppGo/dbJson/dbJson.go#L928-L934)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for i, t := range dbStruct.Tables {
for ii, _ := range t.Fields {
t.Fields[ii].Tbl = &t
}
// Link each table back to the database.
dbStruct.Tables[i].DB = DbStruct()
}
```
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: 6d592b33436c7a0c636d619243a1f34819e87a01
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pkg/genSqlAppGo/dbJson/dbJson.go at lines 928-934 and inspect the surrounding dbStruct and table-field usage. Determine whether the reported reference to the range variable is a real issue, then use the issue's Bug, Mitigated, or Desirable Behavior classification guidance; done means leaving the appropriate reaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100