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

Make clippy happy #2587

Merged
merged 7 commits into from
Dec 8, 2022
Merged

Make clippy happy #2587

merged 7 commits into from
Dec 8, 2022

Conversation

trinity-1686a
Copy link
Contributor

Clippy had many complains. I tried to fix those I could, and added explicit allow(clippy::...) for the others.

I left missing_safety_doc alone: it triggers a lot, but in most case I'd lack the knowledge to actually do something intelligent about it.

this just disable some lints which should probably not: some of what
they point too seems to be actual UB.
`missing_safety_doc` is to be ignored for clippy to be trully happy
@github-actions github-actions bot added 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 4, 2022
@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Base: 67.04% // Head: 67.07% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (a7e4933) compared to base (2a6b99c).
Patch coverage: 59.09% of modified lines in pull request are covered.

❗ Current head a7e4933 differs from pull request most recent head 19a41f6. Consider uploading reports for the commit 19a41f6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2587      +/-   ##
==========================================
+ Coverage   67.04%   67.07%   +0.02%     
==========================================
  Files         197      195       -2     
  Lines       29171    29018     -153     
  Branches     5743     5708      -35     
==========================================
- Hits        19558    19464      -94     
+ Misses       5055     5020      -35     
+ Partials     4558     4534      -24     
Flag Coverage Δ
tests 67.07% <59.09%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
src/lib/shadow-build-common/src/lib.rs 1.36% <0.00%> (ø)
src/lib/shadow-shim-helper-rs/src/lib.rs 75.00% <ø> (ø)
src/main/core/sim_stats.rs 61.76% <0.00%> (-5.98%) ⬇️
src/main/core/work/event_queue.rs 40.00% <0.00%> (-1.80%) ⬇️
src/main/core/work/task.rs 55.71% <ø> (ø)
src/main/host/memory_manager/memory_copier.rs 74.44% <ø> (+1.11%) ⬆️
src/main/host/memory_manager/memory_mapper.rs 68.94% <0.00%> (-2.28%) ⬇️
src/main/host/syscall/handler/mod.rs 78.66% <ø> (-3.39%) ⬇️
src/main/host/thread.rs 71.65% <0.00%> (ø)
src/main/lib.rs 100.00% <ø> (ø)
... and 107 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.

Copy link
Contributor

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

src/lib/shadow-shim-helper-rs/src/emulated_time.rs Outdated Show resolved Hide resolved
src/lib/shmem/src/allocator.rs Outdated Show resolved Hide resolved
src/lib/shmem/src/scmutex.rs Outdated Show resolved Hide resolved
src/lib/shmem/src/scmutex.rs Outdated Show resolved Hide resolved
src/main/core/main.rs Outdated Show resolved Hide resolved
src/main/host/syscall/handler/mod.rs Outdated Show resolved Hide resolved
src/main/host/syscall/handler/socket.rs Outdated Show resolved Hide resolved
src/main/host/syscall_types.rs Show resolved Hide resolved
src/main/network/router/mod.rs Outdated Show resolved Hide resolved
src/main/utility/mod.rs Outdated Show resolved Hide resolved
@trinity-1686a trinity-1686a changed the title Make clippy Make clippy happy Dec 5, 2022
@robgjansen robgjansen added this to the Code health and maintenance milestone Dec 5, 2022
@robgjansen robgjansen added this to In progress in Release v2.4 via automation Dec 5, 2022
@robgjansen
Copy link
Member

@trinity-1686a thanks for the PR! Just FYI, we're going to wait for review from @sporksmith to help address some of the remaining items before moving forward.

src/lib/shadow-shim-helper-rs/src/lib.rs Outdated Show resolved Hide resolved
src/lib/shmem/src/allocator.rs Outdated Show resolved Hide resolved
src/lib/shmem/src/scmutex.rs Outdated Show resolved Hide resolved
src/main/host/syscall_types.rs Show resolved Hide resolved
@sporksmith
Copy link
Contributor

Thanks for the cleanup! Once this gets merged maybe we should think about adding clippy to our lints GH workflow.

@sporksmith sporksmith enabled auto-merge (squash) December 8, 2022 15:26
@sporksmith sporksmith merged commit e4439ad into shadow:main Dec 8, 2022
Release v2.4 automation moved this from In progress to Done Dec 8, 2022
@trinity-1686a trinity-1686a deleted the clippy branch December 8, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants