astral-sh / astral-sh/ruff

Preview: Prevent duplicate warnings for repeated selections

Open
#7,367 0 comments 0 reactions 0 assignees View on GitHub
preview
Dominant language
Rust
Stars
49.6k
Forks
2.4k
Avg merge
1d 21h
Merged PRs (30d)
435

Description

When we throw warnings for deprecated selections of nursery rules, we don't check if we have warned before.

> Because this doesn't use `warn_user_once_by_id`, the warnings will probably show up multiple times if we run this configuration resolution multiple times (which we might in a given invocation -- I can't remember exactly). Is it possible to use `warn_user_once_by_id`?

_Originally posted by @charliermarsh in https://github.com/astral-sh/ruff/pull/7210#discussion_r1323482428_

Contributor guide

Open the contributing guide

Research direction

Locate the nursery-rule deprecation warning path and compare it with the existing warn_user_once_by_id helper. Verify how configuration resolution can run repeatedly, then confirm that each warning is emitted only once during an invocation and that existing warning behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.