-
Notifications
You must be signed in to change notification settings - Fork 176
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
Lint docs tests for unused imports #4570
Comments
There are also other lints like unused variables that should definitely be checked. |
Hello there! I'd like to work on this issue! Could you please assign this to me? |
There you go, let me know if you have any questions! |
@robertbastian I'm sorry if I sound dumb, I'm new to the project. Just wanted to confirm something. When you say "docs tests", you mean the tutorials in the docs folder right? Also, if I need to do it for all the languages in the tutorials folder, is it possible to run all the tutorials with '-D warnings' to get error when unused imports exist? Thanks for your help! |
No, docs tests are the code in Rustdoc, i.e. things like this icu4x/components/list/src/list_formatter.rs Lines 97 to 121 in f4fe3c5
Lines 49 to 53 in f4fe3c5
|
Cleaned all the unused imports, which can be confusing to clients and developers. Part of #4570
Fixed by #4628, yes? |
I would consider this fixed if we have CI that prevents backsliding. |
I've come across a number of docs tests that have unused imports, which can be confusing to clients and developers.
We should clean up unused imports and then prevent them from being added again.
@Manishearth suggested running docs tests with
-D warnings
or a flag that causes the docs tests to fail if they have unused imports warnings.The text was updated successfully, but these errors were encountered: