Skip to content

feat: Add profile-specific configuration for disallowed methods and t… - #17301

Open
Lallapallooza wants to merge 1 commit into
rust-lang:masterfrom
Lallapallooza:disallowed-profiles-reopen
Open

feat: Add profile-specific configuration for disallowed methods and t…#17301
Lallapallooza wants to merge 1 commit into
rust-lang:masterfrom
Lallapallooza:disallowed-profiles-reopen

Conversation

@Lallapallooza

Copy link
Copy Markdown
Contributor

Add profile-scoped disallow lists for methods and types, wiring the new configuration tables through a shared resolver that can be toggled with #[clippy::disallowed_profile] attributes.

  • extend clippy_config::Conf to parse [profiles.*] tables with per-profile disallowed-methods and disallowed-types entries through reusable helpers
  • introduce clippy_utils::disallowed_profiles to resolve #[clippy::disallowed_profile(s)] attributes with caching, diagnostics for bad inputs, and shared symbol registrations
  • teach DisallowedMethods and DisallowedTypes to honor active profiles, reuse the combined profile set, and annotate diagnostics with the triggering profile name
  • add UI TOML coverage for per-profile behavior and refresh the unknown-key fixture for the new configuration entries
  • register the new attributes and symbols so tool attributes remain recognized and pedantic lints stay clean

changelog: [disallowed_methods]: allow selecting per-scope disallow lists via [profiles.] and the clippy::disallowed_profile attribute changelog: [disallowed_types]: allow selecting per-scope disallow lists via [profiles.] and the clippy::disallowed_profile attribute

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 24, 2026
@rustbot

rustbot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

r? @samueltardieu

rustbot has assigned @samueltardieu.
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: 8 candidates
  • 8 candidates expanded to 8 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@Jarcho

Jarcho commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@rustbot label lint-nominated

Also note #17277 which was an optimization made after this landed previously.

@rustbot rustbot added the lint-nominated Create an FCP-thread on Zulip for this PR label Jun 24, 2026
@rustbot

rustbot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

This lint has been nominated for inclusion.

A FCP topic has been created on Zulip.

@Lallapallooza

Copy link
Copy Markdown
Contributor Author

@Jarcho Hi, are there any updates on FCP?

@Lallapallooza

Copy link
Copy Markdown
Contributor Author

@Jarcho @blyxyas Hello, are there any updates on FCP?

@rustbot

This comment has been minimized.

@Lallapallooza

Copy link
Copy Markdown
Contributor Author

@Jarcho @blyxyas @samueltardieu Hello, are there any updates on FCP?

…ypes

Add profile-scoped disallow lists for methods and types, wiring the new
configuration tables through a shared resolver that can be toggled with

- extend clippy_config::Conf to parse [profiles.*] tables with per-profile
  disallowed-methods and disallowed-types entries through reusable helpers
- introduce clippy_utils::disallowed_profiles to resolve
  #[clippy::disallowed_profile(s)] attributes with caching, diagnostics
  for bad inputs, and shared symbol registrations
- teach DisallowedMethods and DisallowedTypes to honor active profiles,
  reuse the combined profile set, and annotate diagnostics with the
  triggering profile name
- add UI TOML coverage for per-profile behavior and refresh the
  unknown-key fixture for the new configuration entries
- register the new attributes and symbols so tool attributes remain
  recognized and pedantic lints stay clean

changelog: [disallowed_methods]: allow selecting per-scope disallow lists
via [profiles.*] and the clippy::disallowed_profile attribute
changelog: [disallowed_types]: allow selecting per-scope disallow lists
via [profiles.*] and the clippy::disallowed_profile attribute
@Lallapallooza
Lallapallooza force-pushed the disallowed-profiles-reopen branch from 3f4218b to c151a22 Compare August 5, 2026 03:19
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Lallapallooza
Lallapallooza marked this pull request as draft August 5, 2026 04:28
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2026
@Lallapallooza
Lallapallooza marked this pull request as ready for review August 5, 2026 04:28
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2026
@Lallapallooza Lallapallooza reopened this Aug 5, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2026
@Lallapallooza

Copy link
Copy Markdown
Contributor Author

@Jarcho @blyxyas @samueltardieu

Where this stands:

I'm not asking for a merge, I'm asking for a decision. If something is blocking it, I'd like to know what.

@blyxyas

blyxyas commented Aug 12, 2026

Copy link
Copy Markdown
Member

Hi @Lallapallooza, I'm sorry for all these delays. We've had a real reviewer shortage, which was greatly exacerbated by your proposal being a big one. I appreciate a lot the effort you've put into this, and I want to see it being merged.

The FCP process is simply because at one point we had too many lints, and had to implement some friction between big changes being made to avoid tech debt being merged too quickly.

I've had my resources to work on Clippy greatly improved, so I'll be taking more care of your feature from now on.

Again, sorry for the delays, due to the volunteer-based nature of the project, these things sometimes happen.

@blyxyas

blyxyas commented Aug 12, 2026

Copy link
Copy Markdown
Member

@rustbot

rustbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #17607) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lint-nominated Create an FCP-thread on Zulip for this PR S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants