github-vet / github-vet/rangeloop-pointer-findings
shenwei356/unikmer: unikmer/cmd/grep.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [shenwei356/unikmer](https://www.github.com/shenwei356/unikmer) at [unikmer/cmd/grep.go](https://github.com/shenwei356/unikmer/blob/586cb4912ed3d9895f1e9d65f952dbd1395bcd7c/unikmer/cmd/grep.go#L455-L460)
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 q was used in a composite literal at line 456
[Click here to see the code in its original context.](https://github.com/shenwei356/unikmer/blob/586cb4912ed3d9895f1e9d65f952dbd1395bcd7c/unikmer/cmd/grep.go#L455-L460)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, q := range _queries {
hasher, err = nthash.NewHasher(&q, uint(k))
checkError(errors.Wrap(err, string(q)))
hash, _ = hasher.Next(_canonical)
m[hash] = struct{}{}
}
```
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: 586cb4912ed3d9895f1e9d65f952dbd1395bcd7c
Contributor guide
No contributing guide indexed for this repository
Research direction
Read unikmer/cmd/grep.go at lines 455-460 and the linked commit context first; trace the q argument into nthash.NewHasher and review the analyzer's range-loop-pointer guidance. Done means deciding whether the finding is a Bug, Mitigated, or Desirable Behavior and recording that classification with the requested reaction.
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
- 30/100