{"id":"45ee40860e16f1ee","repo":"rust-lang/cargo","slug":"lints-tool-name-is-not-a-valid-lint-name","errorCode":null,"errorMessage":"`lints.{tool}.{name}` is not a valid lint name","messagePattern":"`lints\\.(.+?)\\.(.+?)` is not a valid lint name","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/workspace/parser/mod.rs","lineNumber":2735,"sourceCode":"            }\n            if let Some(existing) = seen_normalized.get(&normalized) {\n                warnings.push(format!(\n                    \"duplicate lint `{existing}` in `[lints.{tool}]`, \\\n                     conflicts with `{name}` and will not work in a future edition\"\n                ));\n            }\n            seen_normalized.insert(normalized.clone(), name.to_string());\n            if let Some((prefix, suffix)) = name.split_once(\"::\") {\n                if tool == prefix {\n                    anyhow::bail!(\n                        \"`lints.{tool}.{name}` is not valid lint name; try `lints.{prefix}.{suffix}`\"\n                    )\n                } else if tool == \"rust\" && supported.contains(&prefix) {\n                    anyhow::bail!(\n                        \"`lints.{tool}.{name}` is not valid lint name; try `lints.{prefix}.{suffix}`\"\n                    )\n                } else {\n                    anyhow::bail!(\"`lints.{tool}.{name}` is not a valid lint name\")\n                }\n            } else if let Some(config) = config.config() {\n                for config_name in config.keys() {\n                    // manually report unused manifest key warning since we collect all the \"extra\"\n                    // keys and values inside the config table\n                    let expected = EXPECTED_LINT_CONFIG.contains(&(tool, name, config_name));\n                    if !expected {\n                        let message =\n                            format!(\"unused manifest key: `lints.{tool}.{name}.{config_name}`\");\n                        warnings.push(message);\n                    }\n                }\n            }\n        }\n    }\n\n    Ok(())\n}","sourceCodeStart":2717,"sourceCodeEnd":2753,"githubUrl":"https://github.com/rust-lang/cargo/blob/0e07a155371a6ce88ae53a2c00df940280c09a67/src/workspace/parser/mod.rs#L2717-L2753","documentation":"Thrown during lint-table validation at src/workspace/parser/mod.rs:2735 — the catch-all for a lint name that contains `::` but matches neither of the recoverable cases (prefix != tool, and not a supported-tool re-home). Cargo cannot map the qualified name to any known lint group, so it rejects it as simply \"not a valid lint name\".","triggerScenarios":"A lint key like `[lints.rust] foo::bar = \"warn\"` where `foo` is neither the tool nor a supported tool (e.g. an arbitrary group or typo).","commonSituations":"Typos in lint names; using clippy-style group names under the wrong tool; inventing qualified names that don't exist.","solutions":["Use the bare, real lint name for the tool: `[lints.rust] bar = \"warn\"`.","Confirm the lint exists via `rustc -W help` / clippy docs and which tool table it belongs to.","Drop any unsupported `::` qualifier."],"exampleFix":"# before\n[lints.rust]\nfoo::bar = \"warn\"\n# after\n[lints.rust]\nbar = \"warn\"","handlingStrategy":"validation","validationCode":"for (name, _) in lints_for_tool {\n    if name.contains(\"::\") {\n        return Err(format!(\"{name} is not a valid lint name for [lints.{tool}]\"));\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify lint names against `rustc -W help`/clippy docs.","Avoid inventing `::` group qualifiers; use bare names."],"tags":["manifest","lints","naming"],"analyzedSha":"0e07a155371a6ce88ae53a2c00df940280c09a67","analyzedAt":"2026-08-06T01:46:58.334Z","schemaVersion":2}