Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix global lint inheritence
  • Loading branch information
2010YOUY01 committed Nov 7, 2025
commit f6c873ca2d9dc2c03b26211e378221c8c166b8c1
11 changes: 2 additions & 9 deletions datafusion/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,8 @@ rust-version = { workspace = true }
[package.metadata.docs.rs]
all-features = true

[lints] # Overrides / extends workspace.lints
[lints.clippy]
# Avoid unnecessary clones for performance, okay to ignore for tests or intentional
# moves.
# Reference: <https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value>
needless_pass_by_value = "deny"
# Make sure fast / cheap clones on Arc are explicit:
# https://github.com/apache/datafusion/issues/11143
clone_on_ref_ptr = "deny"
[lints]
workspace = true

[lib]
name = "datafusion_common"
Expand Down
5 changes: 5 additions & 0 deletions datafusion/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
// Make sure fast / cheap clones on Arc are explicit:
// https://github.com/apache/datafusion/issues/11143
#![deny(clippy::clone_on_ref_ptr)]
// https://github.com/apache/datafusion/issues/18503
#![deny(clippy::needless_pass_by_value)]
// This lint rule is enforced in `../Cargo.toml`, but it's okay to skip them in tests
// See details in https://github.com/apache/datafusion/issues/18503
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To turn off this lint rule for all tests

Expand Down