{"record":{"id":"541faa7e4db5509a","repo":"pbakaus/impeccable","slug":"unknown-ignore-value-flag-arg-541faa","errorCode":null,"errorMessage":"Unknown ignore-value flag: ${arg}","messagePattern":"Unknown ignore-value flag: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skill/scripts/hook-admin.mjs","lineNumber":675,"sourceCode":"      const chunks = [];\n      while (i + 1 < args.length && !String(args[i + 1]).startsWith('--')) {\n        chunks.push(args[++i]);\n      }\n      reason = chunks.join(' ').trim();\n    } else if (arg.startsWith('--reason=')) {\n      reason = arg.slice('--reason='.length).trim();\n    } else if (arg === '--file' || arg === '--files') {\n      if (i + 1 >= args.length) throw new Error(`${arg} requires a glob`);\n      files.push(requireGlob(args[++i], arg));\n    } else if (arg.startsWith('--file=')) {\n      files.push(requireGlob(arg.slice('--file='.length), '--file'));\n    } else if (arg.startsWith('--files=')) {\n      files.push(requireGlob(arg.slice('--files='.length), '--files'));\n    } else if (arg.startsWith('--')) {\n      // Otherwise a typo folds into the value: `ignore-value overused-font Inter\n      // --shard` stored the value \"inter --shard\", which matches no finding, and\n      // reported success. Matches `impeccable ignores add-value`.\n      throw new Error(`Unknown ignore-value flag: ${arg}`);\n    } else {\n      positionals.push(arg);\n    }\n  }\n\n  const [rule, ...valueParts] = positionals;\n  return {\n    rule: String(rule || '').trim().toLowerCase(),\n    value: normalizeIgnoreValue(valueParts.join(' ')),\n    // Sorted: the dedup key compares the files array, so an unsorted scope made\n    // `--file b.css --file a.css` a different entry from `--file a.css --file b.css`.\n    files: Array.from(new Set(files.filter(Boolean))).sort(),\n    shared,\n    local,\n    reason,\n  };\n}\n","sourceCodeStart":657,"sourceCodeEnd":693,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/skill/scripts/hook-admin.mjs#L657-L693","documentation":"Thrown by parseIgnoreValueArgs() when it encounters an argument starting with `--` that is not one of the recognized ignore-value flags (--shared, --local, --reason, --reason=, --file, --files, --file=, --files=). Impeccable rejects unknown flags rather than folding them into the rule/value text, which previously stored a value like \"inter --shard\" that matched no finding and reported success.","triggerScenarios":"Typing `--shard`, `--glob`, `--global`, `--scope`, or any unsupported long flag on an `impeccable hooks ignore-value` invocation; mistyping a supported flag (e.g. `--fil` instead of `--file`).","commonSituations":"Confusing ignore-value flags with ignore-rule flags or with the top-level `impeccable ignores add-value` surface; tab-completion inserting a wrong flag; stale docs.","solutions":["Remove the unknown flag or correct the typo (check against: --shared, --local, --reason, --file/--files).","If you intended project-wide suppression, use `impeccable hooks ignore-rule <rule>` instead, which accepts different flags.","Run `impeccable hooks ignore-value --help` (or read hook-admin.mjs parseIgnoreValueArgs) to confirm the supported flag set."],"exampleFix":"// before\nimpeccable hooks ignore-value overused-font Inter --shard\n// after\nimpeccable hooks ignore-value overused-font Inter --file \"src/widget.css\"","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--shared', '--local', '--reason', '--file', '--files']);\nfor (const a of args) {\n  if (a.startsWith('--') && !a.startsWith('--reason=') && !a.startsWith('--file=') && !a.startsWith('--files=') && !KNOWN.has(a.split('=')[0])) {\n    throw new Error('Unknown ignore-value flag: ' + a);\n  }\n}","typeGuard":"function isKnownIgnoreValueFlag(a) {\n  const head = a.split('=')[0];\n  return ['--shared', '--local', '--reason', '--file', '--files'].includes(head);\n}","tryCatchPattern":null,"preventionTips":["Keep the supported-flag list beside your command builder.","Run the CLI with --help to re-confirm flags after upgrades."],"tags":["cli","validation","ignore-config","impeccable-hooks"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}