Skip to content

Conversation

Copy link

Copilot AI commented Jan 12, 2026

The golangci-lint workflow was failing with 7 linting violations across copyloopvar, revive, and staticcheck rules.

Changes

Removed obsolete loop variable copies (Go 1.22+)

  • pipe/command_test.go, pipe/pipeline_test.go: Deleted ex := ex and tc := tc shadowing patterns no longer needed with per-iteration loop variable scoping

Renamed unused parameters

  • internal/ptree/ptree_test.go, pipe/pipeline.go, pipe/pipeline_test.go: Changed unused callback/function parameters to _

Simplified ExitError field access

  • pipe/command.go: Changed eErr.ProcessState.Sys() to eErr.Sys() since exec.ExitError embeds *os.ProcessState

Suppressed FinishEarly naming lint

  • pipe/pipeline.go: Added //nolint:staticcheck for ST1012 on the FinishEarly sentinel error to preserve public API contract
Original prompt

Fix the failing GitHub Actions workflow "golangci-lint / golangci (push)".
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 60086355999
Job URL: /github/go-pipe/actions/runs/20914899786/job/60086355999?pr=43


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow golangci-lint Fix golangci-lint failures in CI Jan 12, 2026
Copilot AI requested a review from migue January 12, 2026 10:48
@migue migue marked this pull request as ready for review January 12, 2026 10:49
@migue migue requested a review from a team as a code owner January 12, 2026 10:49
Copilot AI review requested due to automatic review settings January 12, 2026 10:49
@migue migue merged commit bdc7024 into copilot/fix-github-actions-workflow-again Jan 12, 2026
4 checks passed
@migue migue deleted the copilot/fix-golangci-lint-workflow branch January 12, 2026 10:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes 7 golangci-lint violations that were causing CI failures, addressing issues across copyloopvar, revive, and staticcheck linting rules.

Changes:

  • Removed obsolete loop variable shadowing patterns (ex := ex, tc := tc) that are no longer needed with Go 1.22+ per-iteration loop variable scoping
  • Renamed unused callback and function parameters to _ to satisfy unused parameter linting rules
  • Simplified exec.ExitError field access by using the embedded method directly
  • Added nolint directive for the FinishEarly sentinel error to preserve the public API naming contract

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pipe/command_test.go Removed obsolete ex := ex loop variable shadowing
pipe/pipeline_test.go Removed tc := tc shadowing and renamed unused function parameters to _
pipe/pipeline.go Renamed unused parameter to _ in emptyEventHandler and added nolint directive for FinishEarly sentinel error
pipe/command.go Simplified ExitError field access using embedded Sys() method
internal/ptree/ptree_test.go Renamed unused callback parameter to _

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants