Skip to content

style: fix code style#1346

Open
CyJaySong wants to merge 1 commit into
uptrace:masterfrom
CyJaySong:fix_code_style
Open

style: fix code style#1346
CyJaySong wants to merge 1 commit into
uptrace:masterfrom
CyJaySong:fix_code_style

Conversation

@CyJaySong
Copy link
Copy Markdown
Contributor

Complete the generic parameter passing of the setCommentFromContext function to solve the false positive issue in IDE code analysis

@CyJaySong
Copy link
Copy Markdown
Contributor Author

@vmihailenco

@CyJaySong
Copy link
Copy Markdown
Contributor Author

@Aoang

@Aoang
Copy link
Copy Markdown
Collaborator

Aoang commented Apr 2, 2026

As far as I know, this is a GoLand issue — it fails to properly infer the type here. I recall someone reported a similar problem on JetBrains YouTrack quite a while ago.
Let's wait for feedback from the other maintainers and see if we need to add a workaround in the code to avoid this IDE bug.

@CyJaySong
Copy link
Copy Markdown
Contributor Author

Standard coding helps IDEs analyze code efficiently, doesn't it?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this pr will be closed. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale label May 3, 2026
@CyJaySong
Copy link
Copy Markdown
Contributor Author

refresh

@github-actions github-actions Bot removed the stale label May 4, 2026
@CyJaySong
Copy link
Copy Markdown
Contributor Author

@Aoang I really hope this PR can be recommended. It's not a destructive change and won't affect any logic

@bevzzz
Copy link
Copy Markdown
Collaborator

bevzzz commented May 8, 2026

Standard coding helps IDEs analyze code efficiently, doesn't it?

As @Aoang has correctly pointed out, this is a bug in GoLand's LSP. The official gopls infers the type correctly and anyone using it will have setCommentFromContext[*AddColumnQuery]() flagged with a warning about a redundant generic parameter JetBrains are probably going to fix this soon.

I think setCommentFromContext[*AddColumnQuery] is not idiomatic and we shouldn't add that only to fix the shortcoming of a third-party LSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants