Workflow exceeds complexity threshold¶
Rule ID |
|
|---|---|
Category |
maintainability |
Severity |
low |
Workflow has more than 20 steps across jobs without using reusable workflows or composite actions to reduce complexity.
Detection¶
heuristic — Structural comparison across multiple jobs or steps.
Examples¶
Non-compliant:
jobs:
lint:
steps: [] # 6 steps
test:
steps: [] # 8 steps
build:
steps: [] # 7 steps
# total: 21 steps — exceeds threshold
Compliant:
# ci.yml — lint + test only
jobs:
lint:
steps: []
test:
steps: []
# release.yml — build + deploy only (separate file)
Fix: Split the workflow into smaller, focused workflows (e.g. ci.yml for lint/test, release.yml for build/deploy). Extract repeated job logic into reusable workflows.