-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
|
|
Was missing one |
|
r? @y21 PR sat dead for a while, apologies if you weren't available. |
|
Sorry, I meant to link this here but forgot: I created a thread on Zulip to discuss the idea of the lint: https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/.22Pre.22-FCP.3A.20.60items_before_use.60 |
|
@y21 I read the thread. And if I understood correctly the consensus is against the lint. Because the functionality is already covered by the This lint is too specialized for what amounts to a stylistic preference. Even if use ordering were widely agreed upon, warning by default is too aggressive. I understand and I'm fine with this, It was just my first PR and i really wanted to work on a rust project, that's why i assigned another person to get things moving. Apologies for that. |
|
☔ The latest upstream changes (possibly 368b235) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Discussion on this lint unanimously decided it's not going to be needed, and it's been laying dead for a while. Closing. |
fixes #259
changelog: New lint [
items_before_use]: Checks for misplacedusestatements 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
usestatements incfgblocks.