Skip to content

New Clippy source test: lint-attributes-organization#17050

Draft
samueltardieu wants to merge 21 commits into
rust-lang:masterfrom
samueltardieu:cleanups/attributes-in-tests
Draft

New Clippy source test: lint-attributes-organization#17050
samueltardieu wants to merge 21 commits into
rust-lang:masterfrom
samueltardieu:cleanups/attributes-in-tests

Conversation

@samueltardieu
Copy link
Copy Markdown
Member

@samueltardieu samueltardieu commented May 21, 2026

View all comments

Add a new Clippy source test lint-attributes-organization which checks that:

  • top-level inner lint-related attributes (allow/deny/expect/forbid/warn) are not repeated in tests
  • unprefixed lint names (unused) come before prefixed ones (clippy::cast_precision_loss)
  • lint names are ordered in each category

changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 21, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 21, 2026

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, llogiq

@samueltardieu samueltardieu changed the title Cleanups/attributes in tests Cleanups attributes in tests May 21, 2026
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from b34c6cb to a63909a Compare May 21, 2026 21:05
@samueltardieu
Copy link
Copy Markdown
Member Author

Since we talked about this yesterday at the AllHands:
r? ada4a

@rustbot rustbot assigned ada4a and unassigned Jarcho May 22, 2026
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from a63909a to f51b2ed Compare May 23, 2026 08:54
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from f51b2ed to 8b1396b Compare May 23, 2026 09:57
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from 8b1396b to 6a5bcbb Compare May 24, 2026 01:16
@rustbot

This comment has been minimized.

Comment thread tests/ui/arithmetic_side_effects.rs Outdated
Comment thread tests/ui/assertions_on_constants.rs Outdated
Comment thread tests/ui/assigning_clones.rs Outdated
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 25, 2026
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 3 times, most recently from 499e1d1 to d7f3968 Compare May 25, 2026 13:35
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu requested a review from ada4a May 25, 2026 13:41
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels May 25, 2026
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from d7f3968 to 37d6642 Compare May 25, 2026 13:53
Copy link
Copy Markdown
Contributor

@ada4a ada4a left a comment

Choose a reason for hiding this comment

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

Apologies for only giving the review piecemeal, it's a bit too big to get through in one sitting (it also makes GitHub very laggy...)

View changes since this review

Comment thread tests/ui-cargo/multiple_inherent_impl/crate_fail/src/main.rs
Comment thread tests/ui-cargo/multiple_inherent_impl/file_fail/src/main.rs
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 26, 2026
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from 37d6642 to ce0ffbf Compare May 26, 2026 11:46
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from 62762e9 to f421db8 Compare May 28, 2026 09:20
@samueltardieu samueltardieu changed the title Cleanups attributes in tests New Clippy source test: lint-attributes-organization May 28, 2026
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 4 times, most recently from 864c390 to ee4ca20 Compare May 28, 2026 10:53
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 2 times, most recently from 070e0e9 to 1903ce5 Compare May 28, 2026 13:46
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 2 times, most recently from f0eaafe to cc18b2c Compare May 28, 2026 16:21
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 2 times, most recently from b1f309f to 6bb3971 Compare May 29, 2026 07:47
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from 6bb3971 to 452e1c3 Compare May 29, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants