Skip to content

PQA010 — Invalid commands configuration

pq-commands.yaml cannot be parsed, so no command records are generated from it.

The message carries the parser's own reason: the offending line, an empty document, or a structure the deserializer cannot map.

Why the build refuses this

A command document that does not parse produces no commands at all. Every hand-written Handle(...) method then takes a parameter type that does not exist, so the failure surfaces as compile errors in the adapter's command handlers rather than in the document that caused it.

Commands are optional; a broken document is not. An adapter with no commands simply omits the file. Once the file exists, the generator reads it as authoritative and will not fall back to ignoring it.

How to fix it

Read the reason in the message. Indentation is the usual cause — the document is YAML, so a tab character is never valid indentation.

Check the file is not empty. A file containing only whitespace or comments reports the same diagnostic; delete the file instead when the adapter declares no commands.

Check the top-level shape matches the command document structure, with each command id as a key. A list where a mapping is expected parses as valid YAML and still fails to map.

If you disagree with a report

Do not suppress it. A wrong report is a bug in the check — report it with the YAML that triggered it.