{"record":{"id":"f33defeffe15e30f","repo":"astral-sh/ruff","slug":"rule-prefix-code-was-removed-and-cannot-be-se","errorCode":null,"errorMessage":"Rule `{prefix}{code}` was removed and cannot be selected.","messagePattern":"Rule `(.+?)(.+?)` was removed and cannot be selected\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_workspace/src/configuration.rs","lineNumber":1129,"sourceCode":"                    redirected_from: Some(redirect_from),\n                    ..\n                }\n                | RuleSelector::Rule {\n                    redirected_from: Some(redirect_from),\n                    ..\n                } = selector\n                {\n                    redirects.insert(*redirect_from, selector);\n                }\n            }\n        }\n\n        let removed_selectors = removed_selectors.iter().sorted().collect::<Vec<_>>();\n        match removed_selectors.as_slice() {\n            [] => (),\n            [selection] => {\n                let (prefix, code) = selection.prefix_and_code();\n                return Err(anyhow!(\n                    \"Rule `{prefix}{code}` was removed and cannot be selected.\"\n                ));\n            }\n            [..] => {\n                let mut message =\n                    \"The following rules have been removed and cannot be selected:\".to_string();\n                for selection in removed_selectors {\n                    let (prefix, code) = selection.prefix_and_code();\n                    message.push_str(\"\\n    - \");\n                    message.push_str(prefix);\n                    message.push_str(code);\n                }\n                message.push('\\n');\n                return Err(anyhow!(message));\n            }\n        }\n\n        if !removed_ignored_rules.is_empty() {","sourceCodeStart":1111,"sourceCodeEnd":1147,"githubUrl":"https://github.com/astral-sh/ruff/blob/672bb4edf04c84f8b0753346359daee4057158f2/crates/ruff_workspace/src/configuration.rs#L1111-L1147","documentation":"Error \"Rule `{prefix}{code}` was removed and cannot be selected.\" thrown in astral-sh/ruff.","triggerScenarios":"Thrown at crates/ruff_workspace/src/configuration.rs:1129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"672bb4edf04c84f8b0753346359daee4057158f2","analyzedAt":"2026-08-16T08:54:05.464Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}