Skip to content

De-group attrs.rs #12390

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

Closed
blyxyas opened this issue Feb 29, 2024 · 2 comments
Closed

De-group attrs.rs #12390

blyxyas opened this issue Feb 29, 2024 · 2 comments
Assignees
Labels
good first issue These issues are a good way to get started with Clippy

Comments

@blyxyas
Copy link
Member

blyxyas commented Feb 29, 2024

Description

Currently, the file attrs.rs has 16 instances of declare_clippy_lint! (so it groups 16 lints.) And the checking itself (implementing LateLintPass and EarlyLintPass) just calls other functions, or can be refactored to call other functions.

It would be nice to, instead of having a ~1300 line file, to move these lints into their own directory inside the clippy_lints directory (just like we have the functions or methods directory).

Version

N/A

Additional Labels

No response

@blyxyas blyxyas added the good first issue These issues are a good way to get started with Clippy label Feb 29, 2024
@CBSpeir
Copy link
Contributor

CBSpeir commented Mar 1, 2024

@rustbot claim

@CBSpeir
Copy link
Contributor

CBSpeir commented Mar 1, 2024

The pull request I submitted moves most of the lints in to their own file.

The lints empty_line_after_doc_comments/empty_line_after_outer_attr and deprecated_cfg_attr/deprecated_clippy_cfg_attr were both kept together respectively in their own submodule.

bors added a commit that referenced this issue Mar 2, 2024
Refactor lints in clippy_lints::attrs into separate submodules/files

This pull request contains the changes requested in issue #12390.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These issues are a good way to get started with Clippy
Projects
None yet
Development

No branches or pull requests

3 participants