Skip to content

Fix more clippy warnings + run them in the CI#125

Open
sylvestre wants to merge 7 commits into
uutils:mainfrom
sylvestre:impr
Open

Fix more clippy warnings + run them in the CI#125
sylvestre wants to merge 7 commits into
uutils:mainfrom
sylvestre:impr

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

No description provided.

sylvestre added 7 commits May 5, 2026 20:45
The rendered example wraps a full `fn main`, which trips
clippy::needless_doctest_main on stable. Tag the block as
rust,ignore so it stays syntax-highlighted without being
executed as a doctest.
Wrap `machine()`/`processor()` and `x86_64` in backticks so they render
as code in rustdoc and silence clippy::doc_markdown.
Combine "arm64" with the armv6l/armv7l/armv8l variants since they all
map to "arm". Silences clippy::match_same_arms.
Add an `# Errors` section explaining when `new()` returns
`PlatformInfoError`, satisfying clippy::missing_errors_doc.
Test the failure case (`result == -1`) first so the error path is the
positive branch, satisfying clippy::if_not_else.
The three integration tests never produced an `Err`, so the
`Result<(), String>` return type was dead weight. Switch them to
plain `()` to silence clippy::unnecessary_wraps.
Add `-W clippy::pedantic` alongside `-D warnings` so the pedantic
lint group fires in CI and any new pedantic violation fails the
build.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.75%. Comparing base (5b13a01) to head (7434cbf).

Files with missing lines Patch % Lines
src/platform/unix.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   93.78%   93.75%   -0.04%     
==========================================
  Files           5        5              
  Lines         788      784       -4     
==========================================
- Hits          739      735       -4     
  Misses         49       49              
Flag Coverage Δ
macos_latest 99.37% <83.33%> (-0.02%) ⬇️
ubuntu_latest 99.38% <83.33%> (-0.02%) ⬇️
windows_latest 92.99% <100.00%> (-0.05%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/workflows/ci.yml
Copy link
Copy Markdown
Contributor

@cakebaker cakebaker May 6, 2026

Choose a reason for hiding this comment

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

I would add a [lints.clippy] section to Cargo.toml and enable the pedantic lints there so you can omit -W clippy::pedantic here in this file.

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 this pull request may close these issues.

2 participants