Missing name on jobs or steps¶
Rule ID |
|
|---|---|
Category |
maintainability |
Severity |
info |
Jobs or steps are missing a name field, making CI logs harder to read and debug.
Detection¶
static_analysis — Checks field presence or value in the workflow YAML.
Examples¶
Non-compliant:
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: npm run build
Compliant:
name: CI
on:
push:
branches: [main]
jobs:
build:
name: Build application
runs-on: ubuntu-latest
steps:
- run: npm run build
Fix: Add a top-level name field to the workflow and a name field to each job. Descriptive names appear in the GitHub Actions UI and make CI logs easier to navigate.