-
Notifications
You must be signed in to change notification settings - Fork 67
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
Display forbid(clippy::undocumented_unsafe_blocks)
crates differently
#247
Comments
Thanks for raising this up - So this is clippy dependant thing whilst not guaranteeing build failure like We would have to radd, run and parse clippy - bringing another run dependency We could perhaps add it - #226
Where
There is some work at #213 ideating over how we would be able to track changes and do more validations. Also WG has rust-secure-code/wg#19 (comment) |
Re: Outputs - Requires nightly which we would have to check and guarantee being used - or stable that has received this. Clippy I remember didn't have a flag where we can say require a lint capability or error out - if we would use this as a runner dependency. Nightly
Stable
|
@pinkforest It's been added in rust 1.58, which is not released yet. |
The list of available/supported clippy lints can be get with Using that, the runner could grep for the required lints and return an error if not available. |
I would suggest to pass the required lints from within cargo-geiger to the clippy runner as Below is an example, which simply checks, if
The clippy runner could first check whether all required lints are available and if this is the case, trigger clippy to run. If not it could return an error and cargo-geiger could, if wanted, check which lints are not available and return this to the user or maybe restart without the unavailable lints. |
For crates that require
unsafe
usage, it is possible to ensure all usages ofunsafe
are documented and justified as sound by adding#![forbid(clippy::undocumented_unsafe_blocks)]
to the top of a crate. The lint was recently added so it is not currently very popular, but I think there is still potential.The text was updated successfully, but these errors were encountered: