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

linter: --report-unused-disable-directives #7544

Open
ityuany opened this issue Nov 29, 2024 · 1 comment
Open

linter: --report-unused-disable-directives #7544

ityuany opened this issue Nov 29, 2024 · 1 comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request good first issue Experience Level - Good for newcomers

Comments

@ityuany
Copy link

ityuany commented Nov 29, 2024

Hope to support --report-unused-disable-directives to perform a strong check in CI

@ityuany ityuany added the C-enhancement Category - New feature or request label Nov 29, 2024
@Boshen Boshen changed the title report-unused-disable-directives linter: --report-unused-disable-directives Nov 29, 2024
@Boshen Boshen added good first issue Experience Level - Good for newcomers A-linter Area - Linter labels Nov 29, 2024
@Boshen
Copy link
Member

Boshen commented Nov 29, 2024

Relevant logic:

if self.parent.disable_directives.contains(self.current_rule_name, message.span()) {
return;
}

We need to mark a directive as used here, and then report the unused ones once linting is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request good first issue Experience Level - Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants