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.
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
-onelineoutput throughwc -lto 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 (0clean,1problems found,2invalid flag,3fatal). It should compose with-onelineand-format(summary appended after the per-error output) and work with-no-color. Implementation is roughly 10–20 lines incommand.go(count the returned[]*Error, group byFilepath, and print the aggregate aftercmd.runLinterreturns).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.