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

SergeyDjam/jirasignal: main.go; 10 LoC

Open
#16,963 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 [SergeyDjam/jirasignal](https://www.github.com/SergeyDjam/jirasignal) at [main.go](https://github.com/SergeyDjam/jirasignal/blob/47269a779f63038b18e56be22a66e3e5f8b48362/main.go#L62-L71)

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

[Click here to see the code in its original context.](https://github.com/SergeyDjam/jirasignal/blob/47269a779f63038b18e56be22a66e3e5f8b48362/main.go#L62-L71)

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

```go
for _, issue := range issues {

n := newNotificationFromIssue(issue)
fmt.Println(issue.Key, "has some changes ->", jiraIssue{&issue}.getLink(), "at", timeNow())

go func(n notification) {
sendNotification(n)
time.Sleep( time.Duration(i) * time.Second)
}(n)
}

```

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: 47269a779f63038b18e56be22a66e3e5f8b48362

Contributor guide

No contributing guide indexed for this repository

Research direction

Read main.go lines 62-71 in the referenced commit, starting with the range loop and the analyzer message about a reference used in a composite literal. Check whether this usage is a bug, mitigated, or desirable behavior in context. Done means classifying the finding with the corresponding issue reaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.