Skip to content

Enforce clippy#2614

Merged
sporksmith merged 11 commits intoshadow:mainfrom
sporksmith:clippy
Dec 20, 2022
Merged

Enforce clippy#2614
sporksmith merged 11 commits intoshadow:mainfrom
sporksmith:clippy

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith commented Dec 15, 2022

Fixes remaining clippy warnings and adds a clippy job to our lint github workflow. Also pins the default Rust version with a rust-toolchain.yaml file.

@github-actions github-actions bot added Component: Documentation In-repository documentation, under docs/ Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks labels Dec 15, 2022
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 15, 2022

Codecov Report

Base: 67.66% // Head: 67.97% // Increases project coverage by +0.30% 🎉

Coverage data is based on head (d79a383) compared to base (b8578e2).
Patch coverage: 79.06% of modified lines in pull request are covered.

❗ Current head d79a383 differs from pull request most recent head 91536c5. Consider uploading reports for the commit 91536c5 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2614      +/-   ##
==========================================
+ Coverage   67.66%   67.97%   +0.30%     
==========================================
  Files         200      200              
  Lines       29279    29278       -1     
  Branches     5755     5759       +4     
==========================================
+ Hits        19813    19903      +90     
+ Misses       4870     4776      -94     
- Partials     4596     4599       +3     
Flag Coverage Δ
tests 67.97% <79.06%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/lib/shadow-shim-helper-rs/src/lib.rs 75.00% <ø> (ø)
src/lib/shadow-shim-helper-rs/src/notnull.rs 66.66% <ø> (ø)
src/lib/shadow-shim-helper-rs/src/shim_shmem.rs 77.49% <ø> (ø)
src/lib/shmem/src/allocator.rs 81.19% <0.00%> (+0.32%) ⬆️
src/lib/tsc/src/lib.rs 72.54% <ø> (ø)
src/lib/vasi/src/lib.rs 100.00% <ø> (ø)
src/main/core/scheduler/pools/bounded.rs 74.50% <ø> (ø)
src/main/core/scheduler/pools/unbounded.rs 77.90% <ø> (ø)
src/main/core/work/task.rs 55.71% <ø> (ø)
src/main/host/context.rs 61.29% <ø> (ø)
... and 51 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stevenengler
Copy link
Copy Markdown
Contributor

Just wanted to comment while I was thinking about it: I think we should either make this test not-required, or set a fixed rust version in the CI. We don't want our CI to start failing because a new clippy version was released which adds new warnings, similar to how we don't fail on code warnings, since sometimes newer rust versions add new warnings and we don't want our tests to fail because of them.

@sporksmith
Copy link
Copy Markdown
Contributor Author

Ok, I think I've got this sorted out now.

I ultimately added a rust-toolchain.toml file to set the default toolchain in general, since it is an issue we've run into with other lints etc. It can be overridden locally various ways if desired, but it probably makes sense to mostly just have everything use that one version.

LMK whether you'd like me to clean up the history a bit before you review/continue-to-review

@sporksmith sporksmith enabled auto-merge December 19, 2022 23:36
@sporksmith sporksmith merged commit a4ab9bf into shadow:main Dec 20, 2022
@sporksmith sporksmith deleted the clippy branch December 20, 2022 00:00
@stevenengler
Copy link
Copy Markdown
Contributor

Just a note: Each time we change the rust version in rust-toolchain.toml it will download a new toolchain without deleting the old version, so you'll have to remember to manually uninstall old toolchains (for example rustup toolchain uninstall 1.66.0) if you want to save disk space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Documentation In-repository documentation, under docs/ Component: Libraries Support functions like LD_PRELOAD and logging Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants