{"record":{"id":"e6db55516dfdd13a","repo":"astral-sh/ruff","slug":"selection-of-deprecated-rules-is-not-allowed-when","errorCode":null,"errorMessage":"Selection of deprecated rules is not allowed when preview is enabled. Remove selection of:","messagePattern":"Selection of deprecated rules is not allowed when preview is enabled\\. Remove selection of:","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_workspace/src/configuration.rs","lineNumber":1197,"sourceCode":"                    let (prefix, code) = selection.prefix_and_code();\n                    return Err(anyhow!(\n                        \"Selection of deprecated rule `{prefix}{code}` is not allowed when \\\n                         preview is enabled.\"\n                    ));\n                }\n                [..] => {\n                    let mut message = \"\\\n                        Selection of deprecated rules is not allowed \\\n                            when preview is enabled. Remove selection of:\"\n                        .to_string();\n                    for selection in deprecated_selectors {\n                        let (prefix, code) = selection.prefix_and_code();\n                        message.push_str(\"\\n\\t- \");\n                        message.push_str(prefix);\n                        message.push_str(code);\n                    }\n                    message.push('\\n');\n                    return Err(anyhow!(message));\n                }\n            }\n        }\n\n        for selection in ignored_preview_selectors.iter().sorted() {\n            let (prefix, code) = selection.prefix_and_code();\n            warn_user_once_by_message!(\n                \"Selection `{prefix}{code}` has no effect because preview is not enabled.\",\n            );\n        }\n\n        let mut rules = RuleTable::empty();\n\n        for rule in select_set {\n            let fix = fixable_set.contains(rule);\n            rules.enable(rule, fix);\n        }\n","sourceCodeStart":1179,"sourceCodeEnd":1215,"githubUrl":"https://github.com/astral-sh/ruff/blob/672bb4edf04c84f8b0753346359daee4057158f2/crates/ruff_workspace/src/configuration.rs#L1179-L1215","documentation":"Error \"Selection of deprecated rules is not allowed when preview is enabled. Remove selection of:\" thrown in astral-sh/ruff.","triggerScenarios":"Thrown at crates/ruff_workspace/src/configuration.rs:1197 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"}