-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Closes Issue4903 #5058
Closes Issue4903 #5058
Conversation
☔ The latest upstream changes (presumably #4945) made this pull request unmergeable. Please resolve the merge conflicts. |
d9f9278
to
7147762
Compare
3c3f469
to
b741eb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we allow pub use ident;
statements? Can this be useful? Maybe if you want to reexport a dependency?
I never think of reexport case. Reexport should be allowed. I will update the lint logic. |
Allowing pub imports is as easy as rust-clippy/clippy_lints/src/wildcard_imports.rs Lines 73 to 75 in 719526f
|
I figure out |
The latest nightly doesn't have |
Oh, just realized, that only |
But I guess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you squash some commitsß After that, this should be ready to merge.
@flip1995, I notice you have being emphasizing squash commits, I am not very sure what makes commits looks good. Are there anything I can read? |
Oh I just meant that you squash the commits on this branch together with What I normally do is 1 commit for the lint implementation/fix, 1 commit for everything tests, and maybe some additional commits for unrelated things (like ¹: This opens your editor where you can
for example would include the second commit in the first commit and keep the 1st and 3rd commit. |
I guess the easiest thing you could do would be
Before you push, do a sanity check with |
Squashed. Thank you for helping me with this pr. @flip1995. |
Oh the history didn't disappear? |
📌 Commit ac9f019 has been approved by |
Closes Issue4903 fixes #4903. Check list: - [x] Followed [lint naming conventions][lint_naming] - [x] Added passing UI tests (including committed `.stderr` file) - [x] `cargo test` passes locally - [x] Executed `./util/dev update_lints` - [x] Added lint documentation - [x] Run `./util/dev fmt` [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints --- changelog: implement lint that warn about single component path imports(`use ident;`).
☀️ Test successful - checks-travis, status-appveyor |
fixes #4903.
Check list:
.stderr
file)cargo test
passes locally./util/dev update_lints
./util/dev fmt
---
changelog: implement lint that warn about single component path imports(
use ident;
).