FP303 · unused-output
A job output, or an output of an internal reusable workflow or action, is declared but nothing reads it.
| Code | Name | Category | Default severity |
|---|---|---|---|
FP303 | unused-output | Outputs | 🟡 warning |
Why it matters
Unused outputs suggest a broken hand-off: either the consumer reads a different name, or the output is dead code.
How to fix
Remove the output, or make the intended consumer read it.
Scope
Job outputs are always judged: only the jobs and workflow outputs of the same workflow can read them. Outputs of a reusable workflow or an action are judged only for an internal unit that this repository uses. Published units are not reported, because their consumers live in other repositories: reusable workflows (except files starting with _), the root action.yml, or exactly the units listed in impact.publish when it is set. Actions in subdirectories (owner/repo/restore@v1) count as internal unless impact.publish lists them. Reading the whole object (toJSON(needs.build.outputs), needs.build.outputs[matrix.key], toJSON(steps)) counts as reading every output. Not reported in generated files, which are not edited by hand.
Example
build:
outputs:
version: ${{ steps.meta.outputs.version }}
digest: ${{ steps.push.outputs.digest }} # nothing reads needs.build.outputs.digest
deploy:
needs: build
steps:
- run: deploy ${{ needs.build.outputs.version }}Configure
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP303: off
# or: unused-output: errorExplain it in the terminal:
flowpact explain FP303