{"record":{"id":"4b833e04e94b1a4a","repo":"pbakaus/impeccable","slug":"unknown-ignore-value-flag-arg","errorCode":null,"errorMessage":"Unknown ignore-value flag: ${arg}","messagePattern":"Unknown ignore-value flag: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/skills/impeccable/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/plugin/skills/impeccable/scripts/hook-admin.mjs#L657-L693","documentation":"parseIgnoreValueArgs() has a fixed flag set: `--shared`, `--local`, `--reason`/`--reason=`, and `--file`/`--files`/`--file=`/`--files=`. Any other `--` token is rejected so a typo cannot fold into the stored value (the comment cites `--shard` turning value into \"inter --shard\", matching nothing, yet reporting success).","triggerScenarios":"Running `hooks ignore-value <rule> <value>` with a misspelled or wrong-subcommand flag such as `--shard`, `--global`, or `--all-values`.","commonSituations":"Typing `--shared` as `--shard`; reaching for a flag from ignore-rule; stale docs.","solutions":["Use only the accepted ignore-value flags: --shared, --local, --reason [text], --file/--files <glob>.","Check the spelling of scope flags (--shared, not --shard/--global)."],"exampleFix":"# before\nimpeccable hooks ignore-value overused-font Inter --shard\n\n# after\nimpeccable hooks ignore-value overused-font Inter --shared","handlingStrategy":"validation","validationCode":"const IGNORE_VALUE_FLAGS = new Set(['--shared', '--local', '--reason', '--file', '--files']);\nfunction isKnownIgnoreValueFlag(a) {\n  return IGNORE_VALUE_FLAGS.has(a) || a.startsWith('--reason=') || a.startsWith('--file=') || a.startsWith('--files=');\n}\nfor (const a of args) {\n  if (String(a).startsWith('--') && !isKnownIgnoreValueFlag(a)) {\n    throw new Error(`Unknown ignore-value flag: ${a}`);\n  }\n}","typeGuard":"function isKnownIgnoreValueFlag(arg) {\n  return ['--shared','--local','--reason','--file','--files'].includes(arg)\n    || arg.startsWith('--reason=') || arg.startsWith('--file=') || arg.startsWith('--files=');\n}","tryCatchPattern":null,"preventionTips":["Confine ignore-value flags to --shared/--local/--reason/--file(--files).","Double-check spelling: --shared, not --shard/--global."],"tags":["cli","argument-parsing"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}