Skip to content

[WIP] Run clippy fix on clippy::pedantic errors #3206

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

crutcher
Copy link
Contributor

Checklist

  • Confirmed that cargo run-checks command has been executed.
  • Made sure the book is up to date with changes in this PR.

Changes

This sits on top of #3200

I enabled pedantic = "deny"; ran cargo clippy --fix; then disabled and cleaned up.

Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 71.89189% with 312 lines in your changes missing coverage. Please review.

Project coverage is 82.08%. Comparing base (e21cc7e) to head (15a97de).
Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
crates/onnx-ir/src/ir.rs 4.87% 39 Missing ⚠️
crates/burn-cubecl-fusion/src/shared/kernel.rs 0.00% 23 Missing ⚠️
crates/burn-router/src/runner.rs 79.43% 22 Missing ⚠️
...ates/burn-train/src/renderer/tui/metric_numeric.rs 0.00% 16 Missing ⚠️
crates/burn-train/src/renderer/tui/renderer.rs 0.00% 15 Missing ⚠️
crates/burn-cubecl-fusion/src/shared/io.rs 0.00% 9 Missing ⚠️
crates/burn-remote/src/server/base.rs 0.00% 7 Missing ⚠️
.../burn-dataset/src/source/huggingface/downloader.rs 0.00% 6 Missing ⚠️
crates/burn-ndarray/src/ops/simd/conv.rs 25.00% 6 Missing ⚠️
crates/burn-tch/src/ops/base.rs 14.28% 6 Missing ⚠️
... and 77 more

❌ Your patch check has failed because the patch coverage (71.89%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3206      +/-   ##
==========================================
- Coverage   82.22%   82.08%   -0.14%     
==========================================
  Files         962      963       +1     
  Lines      122572   122762     +190     
==========================================
- Hits       100779   100769      -10     
- Misses      21793    21993     +200     

☔ 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.

@crutcher crutcher force-pushed the crutcher/pedantic branch from 28239b9 to 15a97de Compare May 16, 2025 22:05
Copy link
Contributor

This PR has been marked as stale because it has not been updated for over a month

@github-actions github-actions bot added the stale The issue or pr has been open for too long label Jun 16, 2025
Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

This mostly seems to fix more aggressive clippy lints along with typos / formatting in docstrings. Not entirely against, though I feel some lints are probably more opiniated than anything so we might have to be careful.

One thing I am not sure about is the usage of #[must_use]. I also think its usage should be informed to indicate specific types that are "important" (e.g., results that should not be ignored, or types with custom drop implementation). In other words, this is more advice to the usage than anything. I did not review the whole set of changes, but the few additions of must_use seemed to make sense at first glance.

@crutcher did you actually want to go through with some of these suggestions, or were you mostly fiddling with the lints? In other words, should this be closed or not 😅 )

@laggui laggui mentioned this pull request Jun 16, 2025
2 tasks
@crutcher
Copy link
Contributor Author

I think most of these suggestions are good ideas; and I'd like to move forward by turning on specific extra lints, one at a time, and fixing them.

@github-actions github-actions bot removed the stale The issue or pr has been open for too long label Jun 17, 2025
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