Enable more clippy lints - #24566
Open
emilk wants to merge 13 commits into
Open
Conversation
emilk
marked this pull request as ready for review
August 21, 2026 17:41
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24566 +/- ##
========================================
Coverage 81.53% 81.53%
========================================
Files 1123 1123
Lines 406283 406416 +133
Branches 406283 406416 +133
========================================
+ Hits 331264 331381 +117
- Misses 55655 55668 +13
- Partials 19364 19367 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Remove a dead `let _expected = …` binding left over from a removed assertion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Compare the file extension with `Path::extension()` instead of
`str::ends_with(".csv")`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All five hits are FFI local-bypass tests that downcast a trait object to its concrete type with a pointer cast. The casts are aligned, so mark them with targeted `#[expect]` attributes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Turn quoted doc links into real intra-doc links where a target exists, and wrap array examples and SQL snippets in backticks or text code fences. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Change internal fn parameters and return types from `&Option<T>` to `Option<&T>`, updating callers to pass `.as_ref()`. Also changes the public `apply_masking` in datafusion-substrait, which forwards from a flagged internal fn. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop `continue` expressions that end a loop iteration anyway, flattening the surrounding `match`/`if` where that reads better. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use `Iterator::copied`/`Option::copied` instead of `cloned` for `Copy` types. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop semicolons after `match`/`if` expressions in tail position. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop trailing commas after single-item non-tuple parens/brackets. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
emilk
force-pushed
the
emilk/enable-more-clippy-lints-2
branch
from
August 24, 2026 09:54
3965bd2 to
c0eb49d
Compare
Contributor
|
@emilk can you fix some more? :D |
Contributor
Author
|
I'd love to, but want this PR merged first! |
Conflicts: * `operator_statistics/mod.rs`: upstream replaced the provider loop that the `needless_continue` fix touched, so the loop is gone; took upstream. * `topk/mod.rs`: upstream re-indexed `equal_indices` to the gathered sub-batch; kept that and dropped the `continue` per `needless_continue`. New upstream code that trips the lints this branch enables: * `joins/utils.rs`: `&Option<RecordBatch>` -> `Option<&RecordBatch>` (`ref_option`) * `hash_utils.rs`: `cloned` -> `copied` (`cloned_instead_of_copied`) * `statistics_order_tests.rs`: trailing comma (`unnecessary_trailing_comma`) * `fixed_size_binary_filter.rs`, `in_list_strategy.rs`: `#[expect]` for the alignment-check casts (`cast_ptr_alignment`) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
@emilk some more lints ;) |
…lippy-lints-2 # Conflicts: # datafusion/expr/src/udaf.rs
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Clippychecks in CI #18467.Rationale for this change
Continuing #24466: turn on more
clippy::pedanticlints (opt-out list inCargo.toml).What changes are included in this PR?
One commit per lint, each removing its
"allow"line fromCargo.tomland fixing every site. Review one commit at a time!
Let me know if you disagree with any and I'll revert it
no_effect_underscore_bindinglet _expected = …bindingcase_sensitive_file_extension_comparisonsPath::extension()instead ofstr::ends_with(".csv")cast_ptr_alignment#[expect]on FFI tests that downcast to a concrete, aligned typedoc_link_with_quotesref_option&Option<T>params/returns changed toOption<&T>needless_continuecontinues that already ended the loop iterationcloned_instead_of_copiedcopied()instead ofcloned()forCopytypesunnecessary_semicolonmatch/ifunnecessary_trailing_commaThe
ref_optioncommit also changes the signature of the publicapply_maskingfn indatafusion-substrait(&Option<MaskExpression>->Option<&MaskExpression>), since it forwards to an internal fn that was flagged.Are these changes tested?
cargo clippy --workspace --all-targets --all-featuresreports nowarnings. The changes are mechanical and behavior-preserving, so no new
tests.
Are there any user-facing changes?
The
ref_optioncommit changes the publicapply_maskingsignature indatafusion-substrait, see above.