Skip to content

Closes #259: Adds new lint items_before_use #14985

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

utkrsharmaa
Copy link

@utkrsharmaa utkrsharmaa commented Jun 5, 2025

fixes #259
changelog: New lint [items_before_use]: Checks for misplaced use statements at module level.

Has a configurable strict mode which enforces to group use statements above all other items in module for better code organization and readability.

Both default and strict mode ignore use statements in cfg blocks.

@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 5, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@utkrsharmaa
Copy link
Author

Was missing one allow statement for my lint in an internal lint. added it just now. Apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use statements anywhere but top of module
3 participants