-
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
Fix FP in print_stdout
#6079
Fix FP in print_stdout
#6079
Conversation
This lint shouldn't be emitted in `build.rs` as `println!` and `print!` are used for the build script.
r? @yaahc (rust_highfive has picked a reviewer for you, use r? to override) |
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.
I left some comments regarding the detection of build scripts
r? @ebroto |
@ebroto Thanks for your review! I addressed these. |
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.
Besides the nits, two things:
tests/ui/print_stdout_build_script.stderr
can be removed, sorry I did not see that in my first review.- I was thinking that we should add an integration test also to make sure the lint actually ignores real build scripts. Could you please add a
build.rs
file underclippy_workspace_tests
similar to theprint_stdout_build_script.rs
that you added (also referencing the issue)? This will be tested by the dogfood tests.
Thanks for your review. It's a good suggestion. However, I tried it but the build script under |
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.
I think the only missing thing was the deny
attribute. I'll merge this if the tests pass.
Thanks for making Clippy better!
@bors r+ |
📌 Commit 1214a85 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Remove the generated files by `update-references.sh` if they are empty An empty file may be generated by `update-references.sh` and committed as is when creating a patch like #6101 (comment) and #6079 (review). So, I think it would be helpful to add documentation, and automatically remove the generated file if it's empty. changelog: none
Fix #6041
This lint shouldn't be emitted in
build.rs
asprintln!
andprint!
are used for the build script.changelog: none