pbakaus/impeccable · error
Unknown ignores action: {action_arg}. Run "impeccable ignore
Error message
Unknown ignores action: {action_arg}. Run "impeccable ignores --help".
What it means
The `impeccable ignores` subcommand dispatches on its first argument via action_for(). If the argument is not --help/-h and does not map to a known action (list, add-rule, add-file, add-value, remove-rule, remove-file, remove-value, clear), run() prints "Unknown ignores action: <arg>. Run \"impeccable ignores --help\"." to stderr and returns exit code 1.
Source
Thrown at crates/detect/src/ignores.rs:539
}
))
}
/// JS: ignores.mjs#run (with cli.js's error handling folded in).
pub fn run(args: &[String], io: &mut Io) -> i32 {
let cwd = io.cwd.to_string_lossy().into_owned();
let action_arg = args.first().map(String::as_str).unwrap_or("list");
let action_arg = if action_arg.is_empty() {
"list"
} else {
action_arg
};
if action_arg == "--help" || action_arg == "-h" {
io.out(USAGE);
return 0;
}
let Some(action) = action_for(action_arg) else {
io.err(&format!(
"Unknown ignores action: {action_arg}. Run \"impeccable ignores --help\".\n"
));
return 1;
};
let rest: Vec<String> = args.get(1..).unwrap_or(&[]).to_vec();
let out = match action {
"list" => Ok(list(&cwd)),
"add-rule" => add_rule(&cwd, &rest),
"add-file" => add_file(&cwd, &rest),
"add-value" => add_value(&cwd, &rest),
"remove-rule" => remove_rule(&cwd, &rest),
"remove-file" => remove_file(&cwd, &rest),
"remove-value" => remove_value(&cwd, &rest),
_ => clear(&cwd, &rest),
};
match out {
Ok(text) => {
if !text.is_empty() {View on GitHub (pinned to 2bc2879276)
Solutions
- Run `impeccable ignores --help` to list valid actions and re-issue with the exact action name
- Use the correct compound action names: list, add-rule, add-file, add-value, remove-rule, remove-file, remove-value, clear
- Check for typos — actions are hyphenated lowercase verbs, e.g. `add-rule` not `addRule` or `rule`
Example fix
// before $ impeccable ignores remove my-rule Unknown ignores action: remove. Run "impeccable ignores --help". // after $ impeccable ignores remove-rule my-rule
Defensive patterns
Strategy: validation
Validate before calling
const VALID = ['list','add-rule','add-file','add-value','remove-rule','remove-file','remove-value','clear'];
if (!VALID.includes(actionArg)) {
throw new Error(`unknown ignores action: ${actionArg}`);
} Try / catch
// Exit code 1 + 'Unknown ignores action' on stderr means bad verb
const res = spawnSync('impeccable', ['ignores', ...args]);
if (res.status !== 0 && res.stderr.toString().startsWith('Unknown ignores action')) {
console.error('fix the action name; run: impeccable ignores --help');
} Prevention
- Always check `impeccable ignores --help` before scripting new invocations
- Use the exact hyphenated action names (add-rule, remove-value, ...)
- Never pass a rule/file/value in the action position
When it happens
Trigger: Running `impeccable ignores <arg>` where <arg> is any unrecognized action name — e.g. a typo like `remove`, `add`, or a file path passed in place of the action.
Common situations: Typing `impeccable ignores remove rule-x` instead of `remove-rule`; forgetting the action argument entirely and passing a rule/file directly; guessing action names instead of consulting `impeccable ignores --help`; scripts written against an older CLI surface with different action names.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- {}
- usage: latest <slug-or-target> [--json]
- usage: close <resolved-target> <snapshot-file>
- usage: impeccable critique-storage <slug|write|latest|trend|
- {}
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/33990497aba4ae02.
Report an issue: GitHub.