SimilarStepId
¶
Steps should have distinguishable identifiers within a job.
Defined by DuplicateStepIdRule
which supports workflows, actions in the "Default" ruleset along with DuplicateStepId
.
Description¶
Multiple steps having very similar identifiers makes them hard to distinguish.
It's hard to read and understand a workflow when steps have similar identifiers, this is especially important for people with dyslexia or ADHD.
The id:
defined on a step becomes a key in the steps
context,
so it's easy to mistakenly reference another unintended one.
Compliant example¶
Each step has a distinguishable identifier or no identifier.
example.yml
on: push jobs: example: runs-on: ubuntu-latest steps: - run: echo "Example" id: my-step-id - run: echo "Example" - run: echo "Example" id: my-other-step-id
Non-compliant example¶
Identifier of the two steps are very similar.
example.yml
on: push jobs: example: runs-on: ubuntu-latest steps: - run: echo "Example" id: my-step-id - run: echo "Example" id: wy-step-id
- Line 3: Job[example] has similar step identifiers:
my-step-id
andwy-step-id
.