Objective
Evaluate and implement replacing the Docker-based actionlint execution with in-process linting via actionlint.Linter from the Go API.
Context
From discussion #22839: actionlint is already a direct Go dependency (v1.7.11 in go.mod). Running it in-process via actionlint.Linter would:
- Remove the Docker requirement specifically for actionlint (zizmor and poutine still need Docker)
- Eliminate the Docker image version mismatch problem entirely
- Run faster (no container startup overhead)
- Work without a Docker daemon available
Approach
- Research
actionlint.Linter API — see (pkg.go.dev/redacted)
- Prototype in-process linting in
pkg/cli/actionlint.go:
- Replace the
docker run ... rhysd/actionlint:latest command with a call to actionlint.Linter
- Map
[]actionlint.Error results to the existing ActionlintStats and display format
- Preserve the existing behavior:
- Strict mode (errors = compile failure vs. warnings)
- Per-kind stats aggregation in
ActionlintStats
- Docs URL mapping via
getActionlintDocsURL
- Aggregate output display
- Remove
ActionlintImage constant from pkg/cli/docker_images.go if Docker is no longer needed for actionlint
- Add/update tests to cover the new in-process path
Files to Modify
pkg/cli/actionlint.go — replace Docker subprocess with actionlint.Linter
pkg/cli/docker_images.go — remove ActionlintImage if no longer needed
Acceptance Criteria
Generated by Plan Command for issue #discussion #22839 · ◷
Objective
Evaluate and implement replacing the Docker-based actionlint execution with in-process linting via
actionlint.Linterfrom the Go API.Context
From discussion #22839: actionlint is already a direct Go dependency (
v1.7.11ingo.mod). Running it in-process viaactionlint.Linterwould:Approach
actionlint.LinterAPI — see (pkg.go.dev/redacted)pkg/cli/actionlint.go:docker run ... rhysd/actionlint:latestcommand with a call toactionlint.Linter[]actionlint.Errorresults to the existingActionlintStatsand display formatActionlintStatsgetActionlintDocsURLActionlintImageconstant frompkg/cli/docker_images.goif Docker is no longer needed for actionlintFiles to Modify
pkg/cli/actionlint.go— replace Docker subprocess withactionlint.Linterpkg/cli/docker_images.go— removeActionlintImageif no longer neededAcceptance Criteria
ActionlintStatsaggregation still worksmake test-unitpasses