{"record":{"id":"d0feea7d352b8fa5","repo":"astral-sh/ruff","slug":"invalid-dummy-variable-rgx-value-e","errorCode":null,"errorMessage":"Invalid `dummy-variable-rgx` value: {e}","messagePattern":"Invalid `dummy-variable-rgx` value: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/ruff_workspace/src/configuration.rs","lineNumber":843,"sourceCode":"            preview: options.preview.map(PreviewMode::from),\n\n            rule_selections: vec![RuleSelection {\n                select: options.common.select,\n                ignore,\n                extend_select: options.common.extend_select.unwrap_or_default(),\n                fixable: options.common.fixable,\n                unfixable,\n                extend_fixable: options.common.extend_fixable.unwrap_or_default(),\n            }],\n            extend_safe_fixes: options.common.extend_safe_fixes.unwrap_or_default(),\n            extend_unsafe_fixes: options.common.extend_unsafe_fixes.unwrap_or_default(),\n            allowed_confusables: options.common.allowed_confusables,\n            dummy_variable_rgx: options\n                .common\n                .dummy_variable_rgx\n                .map(|pattern| Regex::new(&pattern))\n                .transpose()\n                .map_err(|e| anyhow!(\"Invalid `dummy-variable-rgx` value: {e}\"))?,\n            extend_per_file_ignores: options\n                .common\n                .extend_per_file_ignores\n                .map(|per_file_ignores| {\n                    per_file_ignores\n                        .into_iter()\n                        .map(|(pattern, prefixes)| {\n                            PerFileIgnore::new(pattern, prefixes, Some(project_root))\n                        })\n                        .collect()\n                })\n                .unwrap_or_default(),\n            external: options.common.external,\n            ignore_init_module_imports,\n            explicit_preview_rules: options.common.explicit_preview_rules,\n            per_file_ignores: options.common.per_file_ignores.map(|per_file_ignores| {\n                per_file_ignores\n                    .into_iter()","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/astral-sh/ruff/blob/26f38c119cac42e4d320ba08f09224fdec74af2c/crates/ruff_workspace/src/configuration.rs#L825-L861","documentation":"An anyhow error raised when the `dummy-variable-rgx` setting cannot be compiled into a regular expression. The user-provided pattern is syntactically invalid, so the linter cannot build the matcher for dummy variables.","triggerScenarios":"Thrown at crates/ruff_workspace/src/configuration.rs:843 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the regex syntax in `dummy-variable-rgx`","Test the pattern with a regex engine before putting it in configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f38c119cac42e4d320ba08f09224fdec74af2c","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}