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

[FEATURE REQUEST] Be able to ignore a specific error code on a specific line of code #715

Open
sbrunner opened this issue Jan 20, 2025 · 0 comments · May be fixed by #717
Open

[FEATURE REQUEST] Be able to ignore a specific error code on a specific line of code #715

sbrunner opened this issue Jan 20, 2025 · 0 comments · May be fixed by #717
Assignees

Comments

@sbrunner
Copy link
Member

sbrunner commented Jan 20, 2025

Is your feature request related to a problem? Please describe. A clear and concise
description of what the problem is. Ex. I'm always frustrated when [...]

Currently, it's not possible to ignore a specific issue code on a line.

Describe the solution you'd like A clear and concise description of what you want to
happen.

Add comment # prospector: ignore=<source>.<code>

This is in pylint like syntax, we can also use ruff syntax => # prospector: noqa: <source>.<code>

Describe alternatives you've considered A clear and concise description of any
alternative solutions or features you've considered.

Improve the # noqa with the possibility to add more codes in the comments as Ruff do:
https://docs.astral.sh/ruff/linter/#error-suppression

Additional context Add any other context or screenshots about the feature request
here.

Advantage of # prospector:

  • Be able to add error on useless-supression
  • No bad interaction with other tools

Advantage of # noqa

  • Use more standard comment

As I understand in booth way, the code become specific to prospector

@sbrunner sbrunner self-assigned this Jan 20, 2025
@sbrunner sbrunner linked a pull request Jan 21, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant