-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add unsafe_op_in_unsafe_fn
to Clippy CI & Crates
#9860
Add unsafe_op_in_unsafe_fn
to Clippy CI & Crates
#9860
Conversation
This is a work-in-progress, there are thousands of violations of this lint that must be addressed before CI will complete successfully.
IMO it would be better to add this lint to each crate individually, rather than putting it in CI. That would provide a better development experience since contributors won't be surprised by CI failing when clippy passed locally. It would also make it easier to fix all of the occurrences since we could do it for each crate/groups of crates separately. |
Yeah I think you're right, I'll add that but keep it in the CI as a catch for future crates. |
unsafe_op_in_unsafe_fn
to Clippy CIunsafe_op_in_unsafe_fn
to Clippy CI & Crates
Still WIP, currently 600+ compiler errors. Tentative Completion WIP Reverted Changes to `bevy_mikktspace`
Once #10011 is merged, this could be rebased to integrate the |
Yeah, IMO we should move this to the universal lint config. |
Could you keep the lint at the warn level rather than forbid? It gives a much better local dev experience, and will be denied by CI |
I'm going to have another crack at this now that #10011 is merged, with the goal being to |
There's been some recent work in this area through #11590. Can any of this PR help with that? (Especially |
Objective
Solution
unsafe_op_in_unsafe_fn
to the lint options for CIclippy
task.#![forbid(unsafe_op_in_unsafe_fn)]
to all crates that did not already forbidunsafe
unsafe { ... }
statements around specific uses ofunsafe
where lint raised warnings.Notes
generated.rs
file inbevy_mikktspace
, as something like Refactor bevy_mikktspace to entirely safe rust #9050 will resolve that issue on its own.