-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: enforce clippy::allow_attributes for common crates #18988
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
chore: enforce clippy::allow_attributes for common crates #18988
Conversation
| // $(#[allow(deprecated)])? | ||
| { | ||
| $(let value = $transform(value);)? // Apply transformation if specified | ||
| #[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I wonder if there was a historical reason these allow deprecations were present; was it anticipating future compatibility? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may have been needed for code that was subsequently updated but the allow(deprecated) annotation was not. That is why I like the expect(deprecated) style as then the compiler will tell you when it is no longer actually needed
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
…utes-for-common-crates' into chore-enforce-clippyallow_attributes-for-common-crates
980020f to
9ad4fe0
Compare
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a nice improvement to me -- thank you @chakkk309 and @Jefffrey
| { | ||
| // Ok to use spawn here as SpawnedTask handles aborting/cancelling the task on Drop | ||
| #[allow(clippy::disallowed_methods)] | ||
| #[expect(clippy::disallowed_methods)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
| // $(#[allow(deprecated)])? | ||
| { | ||
| $(let value = $transform(value);)? // Apply transformation if specified | ||
| #[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may have been needed for code that was subsequently updated but the allow(deprecated) annotation was not. That is why I like the expect(deprecated) style as then the compiler will tell you when it is no longer actually needed
## Which issue does this PR close? Part of apache#18881 ## Rationale for this change Implement clippy::allow_attributes lint for **datafusion-common** and **datafusion-common-runtime** crates ## What changes are included in this PR? - Add #![deny(clippy::allow_attributes)] to both crates - Convert #[allow(...)] to #[expect(...)] attributes - Remove unnecessary lint suppressions discovered through unfulfilled expectations ## Are these changes tested? yes ## Are there any user-facing changes? No user-facing changes. --------- Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Which issue does this PR close?
Part of #18881
Rationale for this change
Implement clippy::allow_attributes lint for datafusion-common and datafusion-common-runtime crates
What changes are included in this PR?
Are these changes tested?
yes
Are there any user-facing changes?
No user-facing changes.