Skip to content

Enable allow_attributes lint for arrow-string - #10482

Open
Hashim1999164 wants to merge 3 commits into
apache:mainfrom
Hashim1999164:chore/enable-allow-attributes-lint
Open

Enable allow_attributes lint for arrow-string#10482
Hashim1999164 wants to merge 3 commits into
apache:mainfrom
Hashim1999164:chore/enable-allow-attributes-lint

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 29, 2026

Copy link
Copy Markdown

Which issue does this PR close?

Part of #10458.

Rationale for this change

Enable clippy::allow_attributes for arrow-string so future lint suppressions use expectations and stale suppressions are detectable. The existing large_enum_variant suppressions are still required on x86_64 Linux, so they are converted to target-specific expect attributes instead of unconditional allow attributes.

What changes are included in this PR?

  • Deny clippy::allow_attributes in the arrow-string crate.
  • Convert the two x86_64 Linux large_enum_variant suppressions to lint expectations.

Are there any user-facing changes?

No.

How was this change tested?

  • cargo +1.96.1 fmt --all -- --check
  • cargo +1.96.1 clippy -p arrow-string --all-targets --all-features -- -D warnings
  • cargo +1.96.1 clippy -p arrow-string --target x86_64-unknown-linux-gnu --all-targets --all-features -- -D warnings
  • cargo +1.96.1 test -p arrow-string --all-features (182 unit tests and 10 doc tests passed)

AI assistance

AI assistance was used to identify the lint occurrences and draft the minimal edits. I reviewed the full diff and validated it with formatting, Clippy, and the crate's tests.

@Hashim1999164

Copy link
Copy Markdown
Author

The x86_64 Linux Clippy failure is fixed by using target-specific expect(clippy::large_enum_variant) attributes. I verified Clippy both locally and with --target x86_64-unknown-linux-gnu, plus 182 unit tests and 10 doc tests. The new external-contributor workflow runs are now action_required and need maintainer approval to start.

Comment thread arrow-string/src/binary_predicate.rs Outdated
/// A binary based predicate
#[allow(clippy::large_enum_variant)]
#[cfg_attr(
all(target_os = "linux", target_arch = "x86_64"),

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.

i think its just x86_64; otherwise this will cause an issue on windows too if limited to only linux x86_64

Apply the expectation on all x86_64 targets, not only Linux, so Windows
x86_64 gets the same Clippy handling.
@Hashim1999164

Copy link
Copy Markdown
Author

Updated the Clippy expectation to target_arch = \"x86_64\" so it also covers Windows x86_64, per your review note.

@github-actions github-actions Bot added arrow Changes to the arrow crate arrow-string labels Jul 31, 2026
@Hashim1999164
Hashim1999164 force-pushed the chore/enable-allow-attributes-lint branch from 98a95f2 to 70fb355 Compare July 31, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-string

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants