{"record":{"id":"67d1306911075846","repo":"pbakaus/impeccable","slug":"wildcard-value-ignores-must-be-scoped-with-file","errorCode":null,"errorMessage":"Wildcard value ignores must be scoped with --file <glob>, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value design-system-font-size \"*\" --file \"src/widget.js\". To suppress the rule project-wide use ${projectWide}.","messagePattern":"Wildcard value ignores must be scoped with --file <glob>, e\\.g\\. (.+?) hooks ignore-value design-system-font-size \"\\*\" --file \"src/widget\\.js\"\\. To suppress the rule project-wide use (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/skills/impeccable/scripts/hook-admin.mjs","lineNumber":713,"sourceCode":"  const parsed = parseIgnoreValueArgs(args);\n  if (!parsed.rule || !parsed.value) {\n    throw new Error(`Pass a rule id and value, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value overused-font Inter`);\n  }\n\n  if (parsed.shared && parsed.local) {\n    throw new Error('Pass only one scope flag: --shared or --local');\n  }\n\n  // A bare `*` would suppress the rule everywhere, which is ignore-rule's job and\n  // not what a finding in one file justifies. detector.ignoreValues honours a\n  // `files` scope, so require one — matching `impeccable ignores add-value`.\n  if (parsed.value === '*' && parsed.files.length === 0) {\n    // `ignore-rule overused-font` refuses on its own without --all-values, so\n    // naming the bare form here would hand the user a second error.\n    const projectWide = parsed.rule === 'overused-font'\n      ? `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule} --all-values`\n      : `${IMPECCABLE_COMMAND} hooks ignore-rule ${parsed.rule}`;\n    throw new Error(`Wildcard value ignores must be scoped with --file <glob>, e.g. ${IMPECCABLE_COMMAND} hooks ignore-value design-system-font-size \"*\" --file \"src/widget.js\". To suppress the rule project-wide use ${projectWide}.`);\n  }\n\n  const local = parsed.local;\n  const config = mergeDetectorConfig(readRawDetectorConfig(cwd, { local }));\n  // Key on the file scope too: the same rule/value legitimately appears more than\n  // once with different scopes, and a rule+value-only key overwrote them.\n  const key = ignoreValueEntryKey({ rule: parsed.rule, value: parsed.value, files: parsed.files });\n  const existing = config.ignoreValues.find((entry) => ignoreValueEntryKey(entry) === key);\n\n  if (existing) {\n    if (parsed.reason) existing.reason = parsed.reason;\n  } else {\n    const entry = {\n      rule: parsed.rule,\n      value: parsed.value,\n    };\n    if (parsed.files.length) entry.files = parsed.files;\n    entry.createdAt = new Date().toISOString();","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/plugin/skills/impeccable/scripts/hook-admin.mjs#L695-L731","documentation":"A bare `*` value would suppress the rule everywhere, which is exactly what ignore-rule does. detector.ignoreValues honors a `files` scope, so addIgnoreValue requires a `--file <glob>` whenever the value is `*` and files is empty. The message points to the scoped ignore-value form, and for overused-font additionally names the ignore-rule --all-values escape hatch (since ignore-rule overused-font refuses on its own without --all-values).","triggerScenarios":"Running `hooks ignore-value <rule> \"*\"` with no --file scope.","commonSituations":"Trying to wildcard-suppress a rule via the value path instead of ignore-rule; an agent suppressing a finding by copying the finding's wildcard value.","solutions":["Scope the wildcard to a file: `hooks ignore-value <rule> \"*\" --file \"src/widget.js\"`.","If project-wide suppression is truly intended, use `hooks ignore-rule <rule>` (and for overused-font add `--all-values`)."],"exampleFix":"# before\nimpeccable hooks ignore-value design-system-font-size \"*\"\n\n# after (scoped)\nimpeccable hooks ignore-value design-system-font-size \"*\" --file \"src/widget.js\"\n\n# after (project-wide)\nimpeccable hooks ignore-rule design-system-font-size","handlingStrategy":"validation","validationCode":"if (parsed.value === '*' && parsed.files.length === 0) {\n  throw new Error('Wildcard value ignores must be scoped with --file <glob>, or use ignore-rule for project-wide');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never pass a bare `*` value to ignore-value without a --file scope.","For project-wide suppression, use ignore-rule (and --all-values for overused-font)."],"tags":["cli","argument-parsing","detector-config"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}