-
Notifications
You must be signed in to change notification settings - Fork 6
Fix golangci-lint workflow for Go 1.24 compatibility #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix golangci-lint workflow for Go 1.24 compatibility #43
Conversation
Co-authored-by: migue <[email protected]>
Co-authored-by: migue <[email protected]>
Co-authored-by: migue <[email protected]>
Co-authored-by: migue <[email protected]>
Fix golangci-lint failures in CI
There was a problem hiding this 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 the golangci-lint GitHub Actions workflow to support Go 1.24 compatibility by upgrading golangci-lint and its action to newer versions that support Go 1.24, migrating the configuration to the v2 format, and addressing linter warnings in the codebase.
Changes:
- Upgraded golangci-lint from v1.55 to v2.8.0 and golangci-lint-action from v3.7.0 to v9.2.0
- Migrated
.golangci.ymlfrom v1 to v2 configuration format with updated linters and structure - Fixed code to comply with new linter rules (unused parameters, loop variable capture)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/golangci-lint.yml | Updated action and golangci-lint versions to support Go 1.24 |
| .golangci.yml | Migrated configuration to v2 format, replaced deprecated linters, reorganized settings |
| pipe/pipeline_test.go | Marked unused parameters with underscore, removed unnecessary loop variable capture |
| pipe/pipeline.go | Marked unused parameter with underscore, added nolint for intentional error naming |
| pipe/command_test.go | Removed unnecessary loop variable capture for Go 1.22+ |
| pipe/command.go | Simplified API call from eErr.ProcessState.Sys() to eErr.Sys() |
| internal/ptree/ptree_test.go | Marked unused parameter with underscore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rules: | ||
| main: | ||
| files: | ||
| - $all |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The depguard configuration uses $all without quotes on line 35, but uses quoted '!$test' on line 36. For consistency and to ensure proper YAML parsing, both should use the same quoting style. Consider using quotes for both: '$all' and '!$test'.
| - $all | |
| - '$all' |
The golangci-lint workflow was failing because golangci-lint v1.55 doesn't support Go 1.24, and the action version was too old to recognize v2.x releases.
Changes
.golangci.yml: v1 → v2 config formatversion: "2"fieldexportlooprefwithcopyloopvargosimple(merged intostaticcheck) andtypecheck(no longer a linter)gofmt,goimports) to dedicatedformatterssectionThe workflow now specifies
v2.8.0instead ofv2.8since the newer action requires the full version string.Original prompt
💡 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.