Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrelated Code Actions shown if multiple diagnostics exist on same line #177667

Closed
DudeNr33 opened this issue Mar 19, 2023 · 2 comments
Closed

Unrelated Code Actions shown if multiple diagnostics exist on same line #177667

DudeNr33 opened this issue Mar 19, 2023 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@DudeNr33
Copy link

If multiple diagnostics exist for the same line, and at least one of the codes has a Code Action/Quick Fix available, this quick fix is shown for all codes on this line.

For example:
image

reimported, import-error and no-name-in-module do not have a corresponding code action. However, for all of them the quick fix Run organize imports is shown, which is registered as quick fix for ungrouped-imports only.

image

I stumbled across this when trying to imlement a solution for microsoft/vscode-pylint#205.

@karthiknadig
Copy link
Member

This should be filed on VS Code. We return the Code Action with the diagnostic it applies to. It is up to VS Code to show the right one for a given problem.

I will transfer this to VS Code.

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-pylint Mar 20, 2023
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 20, 2023

Duplicate of #161331

@mjbvz mjbvz marked this as a duplicate of #161331 Mar 20, 2023
@mjbvz mjbvz closed this as completed Mar 20, 2023
@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants