-
-
Notifications
You must be signed in to change notification settings - Fork 941
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
CI: Enable clippy #101
CI: Enable clippy #101
Conversation
.github/workflows/main.yml
Outdated
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: sudo apt-get update | ||
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev libappindicator3-dev |
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.
Clippy would eventually fail when checking the code looking for the 'pango' package, so I added all the dependencies we need for compiling on ubuntu-latest.
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.
Cool, thank you for doing that. I accidentally added libappindicator3 twice, so maybe we want to remove that.
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.
Done!
@@ -745,6 +745,7 @@ impl ScopeState { | |||
/// use_hook(|| Rc::new(RefCell::new(initial_value()))) | |||
/// } | |||
/// ``` | |||
#[allow(clippy::mut_from_ref)] |
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'm not qualified to determine whether the mut_from_ref usage here is sound so I allowed it.
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.
There's a bunch of safety dynamics to enable borrowed lifetimes through the tree, and this is the consequence :/
@@ -1,3 +1,4 @@ | |||
#![allow(warnings)] |
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.
Since this package is very much WIP, I didn't see the point in allowing or fixing each instance individually. We'll need to remove this once the package is closer to ready.
@@ -38,6 +38,7 @@ impl SsrRenderer { | |||
} | |||
} | |||
|
|||
#[allow(clippy::needless_lifetimes)] |
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 believe the below could be
pub fn render_lazy(f: LazyNodes<'_, '_>) -> String {
But since we name the lifetimes in the Safety comment below, I allowed it.
.github/workflows/main.yml
Outdated
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: sudo apt-get update | ||
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev libappindicator3-dev |
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.
Cool, thank you for doing that. I accidentally added libappindicator3 twice, so maybe we want to remove that.
@@ -745,6 +745,7 @@ impl ScopeState { | |||
/// use_hook(|| Rc::new(RefCell::new(initial_value()))) | |||
/// } | |||
/// ``` | |||
#[allow(clippy::mut_from_ref)] |
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.
There's a bunch of safety dynamics to enable borrowed lifetimes through the tree, and this is the consequence :/
This PR enables clippy and applies a few fixes to make it lint successfully. See additional comments below.