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

Use is_lint_allowed() for computationally heavy lints #133

Open
BD103 opened this issue Oct 10, 2024 · 0 comments
Open

Use is_lint_allowed() for computationally heavy lints #133

BD103 opened this issue Oct 10, 2024 · 0 comments
Labels
A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality

Comments

@BD103
Copy link
Member

BD103 commented Oct 10, 2024

By default, all lints are run, even if they are #[allow(...)]d. #[allow(...)] attributes are usually just taken in account when filtering out these diagnostics. This unfortunately can lead to slow lints being run, even if they're never used.

is_lint_allowed() solves this by letting lint passes check if a specific lint is allowed before it runs the heavy computation. While not applicable in all situations, it is useful for speeding up the linter by only running what we need.

@BD103 BD103 added A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality labels Oct 10, 2024
@BD103 BD103 added this to the `bevy_lint` 0.2.0 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Related to the linter and custom lints C-Code-Quality An improvement of readability or quality
Projects
None yet
Development

No branches or pull requests

1 participant