Skip to content

chore: apply workspace lints to all crates - #24076

Merged
2010YOUY01 merged 2 commits into
apache:mainfrom
emilk:emilk/workspace-lints-minimal
Aug 5, 2026
Merged

chore: apply workspace lints to all crates#24076
2010YOUY01 merged 2 commits into
apache:mainfrom
emilk:emilk/workspace-lints-minimal

Conversation

@emilk

@emilk emilk commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The workspace already has a [workspace.lints] table, but it was missing from three crates

What changes are included in this PR?

Inheriting the workspace lints in all crates, and fixing the resulting violations

Are these changes tested?

Yes, by existing tests and CI

Are there any user-facing changes?

No

emilk and others added 2 commits August 4, 2026 09:29
Pure reordering, no lint is added or removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`datafusion/proto`, `datafusion/proto-common` and `datafusion/proto-models`
were the only workspace members without `[lints] workspace = true`, so the
workspace lint configuration silently did not apply to them.

Enabling it surfaces a handful of violations, fixed here:

* `unused_qualifications`: redundant path prefixes (mostly `cargo fix`ed)
* `clippy::or_fun_call`: `unwrap_or(HashMap::new())` -> `unwrap_or_default()`
* `clippy::needless_pass_by_value`: one `#[expect]` on a public API, plus a
  crate-level exemption for the integration tests matching what the other
  DataFusion crates already do for their unit tests

The generated protobuf modules opt out of `unused_qualifications` alongside
the `clippy::all` opt-out they already had.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread Cargo.toml
uuid = "1.23"
zstd = { version = "0.13", default-features = false }

# Keep this list sorted alphabetically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorting makes it easier to check if a lint already has been added

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.89%. Comparing base (26fbf4d) to head (26f1f2d).

Files with missing lines Patch % Lines
datafusion/proto-common/src/to_proto/mod.rs 64.28% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24076      +/-   ##
==========================================
- Coverage   80.89%   80.89%   -0.01%     
==========================================
  Files        1102     1102              
  Lines      376093   376078      -15     
  Branches   376093   376078      -15     
==========================================
- Hits       304239   304211      -28     
- Misses      53748    53757       +9     
- Partials    18106    18110       +4     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2010YOUY01 2010YOUY01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you. I have verified the core change (cargo.toml) manually, and have let codex checked all propagated changes, and it looks good.

@kumarUjjawal kumarUjjawal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@kumarUjjawal

Copy link
Copy Markdown
Contributor

Thank you @emilk and @2010YOUY01

@kumarUjjawal
kumarUjjawal added this pull request to the merge queue Aug 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 4, 2026
alamb added a commit to apache/arrow-rs that referenced this pull request Aug 4, 2026
# Which issue does this PR close?
No issue in particular

- Related to #10458
- Sibling PR: apache/datafusion#24076

# Rationale for this change

Lint configuration is currently repeated per crate in `lib.rs`. A
`[workspace.lints]` table lets us configure lints once, for every crate,
and makes rolling out new lints a one-line change.

Enabling more lints can also help keeping a higher code quality,
reducing bugs.

# What changes are included in this PR?

Modeled on [egui's
`Cargo.toml`](https://github.com/emilk/egui/blob/main/Cargo.toml). I
started small. We can enable more lints in later PRs.

# Are these changes tested?

Yes, by existing CI: `cargo clippy --workspace --all-targets
--all-features -- -D warnings` and the docs job
(`RUSTDOCFLAGS=-Dwarnings`) both pass. Two previously-dead doc examples
now actually compile and run.

# Are there any user-facing changes?

`parquet_variant_compute::VariantArrayIter` is now exported. It was
already returned by the public `VariantArray::iter`, but was not
nameable. No other API changes.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@2010YOUY01
2010YOUY01 added this pull request to the merge queue Aug 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 5, 2026
@2010YOUY01
2010YOUY01 added this pull request to the merge queue Aug 5, 2026
Merged via the queue into apache:main with commit c1366b5 Aug 5, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proto Related to proto crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants