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

Cap the number of lint-amnesty comments #34519

Open
kdmccormick opened this issue Apr 16, 2024 · 2 comments
Open

Cap the number of lint-amnesty comments #34519

kdmccormick opened this issue Apr 16, 2024 · 2 comments
Labels
code health Proactive technical investment via refactorings, removals, etc.

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Apr 16, 2024

People are constantly adding:

# lint-amnesty, pylint: disable=xyz

instead of just:

# pylint: disable=xyz

because they don't realize that lint-amnesty has a special meaning (that is: pylint violations which were grandfathered in because they were introduced before we enforced linting).

If we want lint-amnesty to continue to mean something, then we need to add a check that will hard-code a maximum number of lint-amnesty comments and fail CI if any more area added.

Alternatively, we call it a wash and blanket replace every occurance of lint-amnesty, pylint: with pylint:

@kdmccormick kdmccormick added the code health Proactive technical investment via refactorings, removals, etc. label Apr 16, 2024
@UsamaSadiq
Copy link
Member

Since there is no immediate plan of fixing all pending lint-amnesty warnings, I believe second approach should be more beneficial i.e. changing lint-amnesty, pylint: to just pylint: . Also, it'll be a more straight forward task than introducing a new check.

@kdmccormick
Copy link
Member Author

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Proactive technical investment via refactorings, removals, etc.
Projects
None yet
Development

No branches or pull requests

2 participants