Skip to content

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

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

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

Conversation

@samueltardieu

@samueltardieu samueltardieu commented May 21, 2026

Copy link
Copy Markdown
Member

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

rustbot commented May 21, 2026

Copy link
Copy Markdown
Collaborator

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

@ada4a ada4a 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.

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 2 times, most recently from 010b45c to ff6be42 Compare June 2, 2026 18:53
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from ff6be42 to c0e9d92 Compare June 2, 2026 20:49
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 3 times, most recently from b9c0f96 to 2280dfd Compare June 4, 2026 11:14
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 4 times, most recently from 465f541 to c359a37 Compare June 7, 2026 16:21
@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch 3 times, most recently from 1d278f7 to 4ec93a8 Compare June 7, 2026 21:59
@rustbot

This comment has been minimized.

@samueltardieu samueltardieu force-pushed the cleanups/attributes-in-tests branch from 4ec93a8 to 4a8f5d0 Compare June 8, 2026 12:48
This is needed to implement the new test which checks top-level inner
attributes ordering and structure.
This is needed to implement the new test which checks top-level inner
attributes ordering and structure.
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