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

Proposal: ignore concrete linting warnings via GUI, e.g. via QuickFix in VSCode #9510

Closed
VladimirFokow opened this issue Mar 19, 2024 · 2 comments
Labels
Invalid Not a bug, already exists or already fixed

Comments

@VladimirFokow
Copy link

VladimirFokow commented Mar 19, 2024

Current problem

Sometimes, for example, for a new library, their syntax may still be not integrated in pylint, so the only way to get rid of the warnings is to disable them in settings (JSON).

But it can be hard to know exactly what to write there.

I propose for example, when the user hovers over the linting warning in VSCode, and clicks "Quick fix", there can be an option "Ignore linting like this" which would automatically write to the settings (JSON) this specific case.

(Like the feature "Remember spelling" in some spelling checkers. It's easy - you just have to right-click and select the option you want, no need to think of the syntax how to write it into settings json.)

Desired solution

An option to "remember" not to lint this type of things

(to be more specific, a dialog can open to the users, what specifically they want, (to solve ambiguity) e.g.

  • always only this specific 100% identical syntax,
  • more generally: e.g. any type hints which use this package,
  • type hints in general,
    )

Additional context

pylint already supports disabling specific linting in settings (JSON), for example:

    "python.analysis.diagnosticSeverityOverrides": {
        "reportShadowedImports": "none"
    },

This proposal - is to automatically propose the user which type of linting the concrete case is, and easily "remember" it only with gui clicks, for example, via the VSCode's "quick fix" functionality.

An advantage of this functionality (in addition to speed and convenience) - is the presentation to the users of all possible choices what kinds / combinations to ignore - ones which they might not have though of themselves but which might be more suitable to them.

@VladimirFokow VladimirFokow added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Mar 19, 2024
@VladimirFokow VladimirFokow changed the title Proposal: remember my decision Proposal: ignore concrete linting warnings, e.g. via QuickFix Mar 19, 2024
@VladimirFokow VladimirFokow changed the title Proposal: ignore concrete linting warnings, e.g. via QuickFix Proposal: ignore concrete linting warnings via GUI, e.g. via QuickFix Mar 19, 2024
@VladimirFokow VladimirFokow changed the title Proposal: ignore concrete linting warnings via GUI, e.g. via QuickFix Proposal: ignore concrete linting warnings via GUI, e.g. via QuickFix in VSCode Mar 19, 2024
@Pierre-Sassoulas Pierre-Sassoulas added Invalid Not a bug, already exists or already fixed and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Mar 19, 2024
@Pierre-Sassoulas
Copy link
Member

I like the idea but it needs to be filled here: https://github.com/microsoft/vscode-pylint/issues/new

@Pierre-Sassoulas Pierre-Sassoulas closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@VladimirFokow
Copy link
Author

VladimirFokow commented Mar 19, 2024

thanks!
Filed: microsoft/vscode-pylint#535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Not a bug, already exists or already fixed
Projects
None yet
Development

No branches or pull requests

2 participants