Rules
FP105 · optional-input-no-default-in-condition
An optional input without a default decides an `if:` condition.
| Code | Name | Category | Default severity |
|---|---|---|---|
FP105 | optional-input-no-default-in-condition | Inputs | 🟡 warning |
Why it matters
When a caller omits an optional input that has no default, GitHub substitutes an empty string. Conditions then take the "false" branch silently, so jobs or steps are skipped and the run is still green.
How to fix
Give the input an explicit default, make it required: true, or compare explicitly (inputs.x != '').
Example
inputs:
variant: { type: string, required: false }
...
if: inputs.variant == 'gpu'Configure
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP105: off
# or: optional-input-no-default-in-condition: errorExplain it in the terminal:
flowpact explain FP105