flowpactworkflow contracts
Rules

FP402 · matrix-key-missing-in-combo

An expression reads a matrix key that is only defined in some combinations.

CodeNameCategoryDefault severity
FP402matrix-key-missing-in-comboMatrix🟡 warning

Why it matters

In combinations without the key the value is an empty string. Scripts, env vars and runner labels built from it silently degrade (e.g. --config= with no value).

How to fix

Define the key for every combination, or add a fallback ($\{\{ matrix.key || 'default' \}\}). Not reported: conditions (if:) and continue-on-error, comparisons and negations (matrix.key != '', !matrix.key), matrix.key && ... guards, and combinations where the job or step is skipped by its own if:.

Configure

Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:

.github/flowpact/flowpact.config.yml
rules:
  FP402: off
  # or: matrix-key-missing-in-combo: error

Explain it in the terminal:

flowpact explain FP402

On this page