Skip to main content

require-composite-step-name

Rule catalog ID: R052

Targeted pattern scopeโ€‹

Composite action runs.steps entries.

What this rule reportsโ€‹

Reports composite steps missing a non-empty name.

Why this rule existsโ€‹

Named steps make action logs readable and troubleshooting faster.

โŒ Incorrectโ€‹

runs:
using: composite
steps:
- run: echo hello
shell: bash

โœ… Correctโ€‹

runs:
using: composite
steps:
- name: Print greeting
run: echo hello
shell: bash

Additional examplesโ€‹

For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.

ESLint flat config exampleโ€‹

import githubActions from "eslint-plugin-github-actions-2";

export default [
{
files: ["**/*.{yml,yaml}"],
plugins: {
"github-actions": githubActions,
},
rules: {
"github-actions/require-composite-step-name": "error",
},
},
];

When not to use itโ€‹

You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.

Further readingโ€‹