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

…ypes

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?

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.

4 participants