From 29d81f061ffba18bd5780752a467c6e9f378a740 Mon Sep 17 00:00:00 2001 From: "Gubrud, Aaron D" Date: Fri, 16 Oct 2026 09:51:20 -0700 Subject: [PATCH] fix: check error received from adhoc error channel golangci-lint is installed unpinned (@latest) by the check_lint make target, and errcheck in golangci-lint 2.15.0 now reports a bare channel receive whose value is an error. This fails CI on main and on every open PR without any code change: internal/workflow/workflow.go:222:4: Error return value is not checked (errcheck) The receive is a completion barrier and AdhocFunc already reports its own errors, so consume the value and log it at debug level, matching the handling of the perf error channel in cmd/metrics. Using the blank identifier instead would trip staticcheck's S1005, which runs earlier in make check. Co-Authored-By: Claude Opus 5 --- internal/workflow/workflow.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/workflow/workflow.go b/internal/workflow/workflow.go index e75ce6ac..51f28223 100644 --- a/internal/workflow/workflow.go +++ b/internal/workflow/workflow.go @@ -219,7 +219,9 @@ func (rc *ReportingCommand) Run() error { } // wait for all adhoc actions to complete, errors were reported by the AdhocFunc for range myTargets { - <-adhocErrorChannel + if adhocErr := <-adhocErrorChannel; adhocErr != nil { + slog.Debug("adhoc function error", slog.String("error", adhocErr.Error())) + } } // stop the progress indicator multiSpinner.Finish()