Skip to content

Commit

Permalink
Fix bug where exact codes did not warn on redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Feb 1, 2024
1 parent 65b14fb commit 79bb7ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/ruff/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,7 @@ fn redirect_direct() {
Found 1 error.
----- stderr -----
warning: `RUF940` has been remapped to `RUF950`.
"###);
}

Expand Down
4 changes: 4 additions & 0 deletions crates/ruff_workspace/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,10 @@ impl LintConfiguration {
if let RuleSelector::Prefix {
prefix,
redirected_from: Some(redirect_from),
}
| RuleSelector::Rule {
prefix,
redirected_from: Some(redirect_from),
} = selector
{
redirects.insert(redirect_from, prefix);
Expand Down

0 comments on commit 79bb7ca

Please sign in to comment.