You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pjweinb opened this issue
Jan 3, 2025
· 3 comments
Assignees
Labels
BugIssues describing a bug in the Go implementation.goplsIssues related to the Go language server, gopls.ToolsThis label describes issues relating to any tools in the x/tools repository.
The original code is
// Don't refresh more than twice per minute.
delay := 30 * time.Second
// Don't spend more than ~2% of the time refreshing.
if adaptive := 50 * t.duration; adaptive > delay {
delay = adaptive
}
and it says 'if statement can be modernized using max', pointing to 'adaptive > delay'. For the above code it substitutes
// Don't refresh more than twice per minute.
delay := max(adaptive, delay)
which is syntactically (neither delay not adaptive have been defined) and semantically wrong.
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jan 3, 2025
BugIssues describing a bug in the Go implementation.goplsIssues related to the Go language server, gopls.ToolsThis label describes issues relating to any tools in the x/tools repository.
The original code is
// Don't refresh more than twice per minute.
delay := 30 * time.Second
// Don't spend more than ~2% of the time refreshing.
if adaptive := 50 * t.duration; adaptive > delay {
delay = adaptive
}
and it says 'if statement can be modernized using max', pointing to 'adaptive > delay'. For the above code it substitutes
// Don't refresh more than twice per minute.
delay := max(adaptive, delay)
which is syntactically (neither delay not adaptive have been defined) and semantically wrong.
The text was updated successfully, but these errors were encountered: