{"record":{"id":"541faa7e4db5509a","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":"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/f88b2837a7d7c3182e46307bbbb091a1ed547571/skill/scripts/hook-admin.mjs#L657-L693","documentation":"Thrown while parsing `hooks ignore-value` arguments when a `--`-prefixed token matches none of the supported flags (--shared, --local, --reason, --file, --files and their = forms). The comment in source records the motivating bug: `ignore-value overused-font Inter --shard` stored the value \"inter --shard\", which matched no finding, and reported success. Unknown flags now throw to prevent that silent no-op.","triggerScenarios":"`hooks ignore-value overused-font Inter --shard` (typo); `--files=` misspellings like `--filez`; carrying --all-values over from ignore-rule (it is not valid here); agents inventing flags like --global or --force.","commonSituations":"Autocomplete or muscle memory from the sibling subcommands; scripted flag sets shared across ignore-rule/ignore-file/ignore-value despite different vocabularies per subcommand.","solutions":["Remove or correct the flag — ignore-value accepts --shared, --local, --reason, --file, --files only.","If you meant whole-rule suppression, use `hooks ignore-rule <rule>` instead.","If you meant --file for scoping, check the spelling and give it a glob value."],"exampleFix":"# before\nimpeccable hooks ignore-value overused-font Inter --shard\n\n# after\nimpeccable hooks ignore-value overused-font Inter --file \"src/marketing/**\"","handlingStrategy":"validation","validationCode":"const IGNORE_VALUE_FLAGS = ['--shared', '--local', '--reason', '--file', '--files'];\nfunction isKnownIgnoreValueFlag(a) {\n  return IGNORE_VALUE_FLAGS.includes(a) || IGNORE_VALUE_FLAGS.some(f => a.startsWith(f + '='));\n}\nif (args.some(a => a.startsWith('--') && !isKnownIgnoreValueFlag(a))) {\n  throw new Error(`unknown ignore-value flag; allowed: ${IGNORE_VALUE_FLAGS.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not reuse one flag set across ignore-rule/ignore-file/ignore-value — their vocabularies differ.","--all-values is an ignore-rule flag only; ignore-value has no such flag.","Validate against an allowlist when generating commands programmatically."],"tags":["cli","unknown-flag","hook-admin","ignore-value"],"backgroundTag":"unknown-cli-flag","analyzedSha":"f88b2837a7d7c3182e46307bbbb091a1ed547571","analyzedAt":"2026-08-18T04:58:36.608Z","contentChangedAt":"2026-08-18T04:58:36.608Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}