Skip to content

Add -summary flag for aggregate error count output #691

Description

@fuleinist

Problem

When integrating actionlint into CI status checks, status badges, or pre-commit hooks, there is no built-in way to get a single-line aggregate summary — users currently have to pipe -oneline output through wc -l to count errors.

Solution

Add a -summary (or --summary) flag that prints one aggregate line to stderr (alongside the existing output) summarizing the run, e.g. 12 errors in 5 files (8 workflows checked), and keeps the existing exit codes (0 clean, 1 problems found, 2 invalid flag, 3 fatal). It should compose with -oneline and -format (summary appended after the per-error output) and work with -no-color. Implementation is roughly 10–20 lines in command.go (count the returned []*Error, group by Filepath, and print the aggregate after cmd.runLinter returns).

Use case

CI status checks (GitHub Actions, GitLab CI, Buildkite) and dashboard integrations want a stable one-line summary that downstream tooling can parse without depending on the human-readable error layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions