github-vet / github-vet/rangeloop-pointer-findings

fresh8/bqta: src/bqta/cmd/root.go; 6 LoC

Open
#17,943 0 comments 0 reactions 0 assignees View on GitHub
fresh tiny
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
PR metrics pending

Description

Found a possible issue in [fresh8/bqta](https://www.github.com/fresh8/bqta) at [src/bqta/cmd/root.go](https://github.com/fresh8/bqta/blob/7b45d99264747ec6583efa5147ee003a94e10d91/src/bqta/cmd/root.go#L62-L67)

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 proj was used in a composite literal at line 64

[Click here to see the code in its original context.](https://github.com/fresh8/bqta/blob/7b45d99264747ec6583efa5147ee003a94e10d91/src/bqta/cmd/root.go#L62-L67)

Click here to show the 6 line(s) of Go which triggered the analyzer.

```go
for _, proj := range config.Projects {
if proj.Name == createCmdName {
thisProject = &proj
break
}
}

```

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: 7b45d99264747ec6583efa5147ee003a94e10d91

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/bqta/cmd/root.go at lines 62-67 and inspect how the matched project is selected from config.Projects. Confirm the analyzer's concern against Go range-variable pointer behavior, then look for relevant command tests or run the existing test suite; done means deciding whether this is a real bug, mitigated, or desirable behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.