FP602 · nesting-depth
A chain of reusable workflow calls is deeper than the configured limit (`limits.nestingDepth`).
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP602 | nesting-depth | Graph structure | 🔴 error | lint, check, the action, the editor |
Why it matters
GitHub limits how deeply reusable workflows can be nested and fails the run when the limit is exceeded. Deep chains are also where values get lost between levels.
How to fix
Flatten the chain (call leaf workflows directly from a higher level). GitHub allows at most 10 levels; lower limits.nestingDepth to enforce a stricter internal limit.
Example
# .github/flowpact/flowpact.config.yml
limits:
nestingDepth: 4
# ci.yml → build.yml → package.yml → publish.yml → sign.yml: 5 workflowsAccept one finding
When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and does not fail the build.
On its line, with an ignore comment alone on the line above it (the
editor's quick fix adds it there) or at the end of the line, after any other comment such as a version
(# v4.3.0 # flowpact: ignore[FP602] why):
# flowpact: ignore[FP602] why it is acceptable here
<the line of the finding>In the config, with an override, which can expire:
overrides:
- rule: FP602
target: <the finding's symbol>
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP602") | .symbol'* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches:
target: '**#inputs.app-id' is that input in every workflow and action.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP602: off
# or: nesting-depth: errorExplain it in the terminal:
flowpact explain FP602Related
FP601call-cycle: Reusable workflows call each other in a cycle.