Skip to content
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

Missing forbid unsafe_code attributes #2723

Closed
YgorSouza opened this issue Feb 12, 2023 · 2 comments · Fixed by #2773
Closed

Missing forbid unsafe_code attributes #2723

YgorSouza opened this issue Feb 12, 2023 · 2 comments · Fixed by #2773

Comments

@YgorSouza
Copy link
Contributor

Some crates have the safety dance badge in their individual README files, but none of them have the required #![forbid(unsafe_code)] attribute. Indeed, some of them display the badge even though they actually have unsafe code, namely eframe and egui-winit, which is misleading. The badge should be removed from crates that have unsafe code, and those that don't should have the attribute so they are parsed correctly by cargo-geiger.

emilk added a commit that referenced this issue Feb 28, 2023
@emilk
Copy link
Owner

emilk commented Feb 28, 2023

Good catch! I've removed the misleading badges.

As for parsing correctly with cargo-grieger - is that something you'd be willing to contribute?

@YgorSouza
Copy link
Contributor Author

Sure, I'll try to have a look at it this weekend. As far as I can tell, this is the line that prevents unsafe code:

deny = ["unsafe_code"]

But it isn't part of the crate source and is only used during CI, so geiger doesn't see it.

image

So it should only be a matter of adding the attribute to the crates that don't have unsafe.

mikedilger pushed a commit to mikedilger/egui that referenced this issue Mar 7, 2023
sidit77 pushed a commit to sidit77/egui-tao that referenced this issue May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants