Upgrade Go to 1.27.1 and modernize linting - #337
Merged
Merged
Conversation
… multiple files and bumped to golangci-lint@v2.13.2
rajpreet-s
force-pushed
the
upgrade-go-version
branch
from
September 16, 2026 08:10
085267f to
5a067d5
Compare
suraj-jadhav-ot
approved these changes
Sep 17, 2026
biswajit-patra-dev
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the CLI's Go toolchain from 1.23 to 1.27.1 across the module, CI workflows, and Docker images. Migrates golangci-lint to v2 (required for Go 1.27.1 compatibility) and fixes all
errcheck,bodyclose, andgosecfindings surfaced by the upgraded linter.Changes
Go Version Upgrade
go.mod&CONTRIBUTING.md: Updatedgo 1.23.0→go 1.27.1and updated documented contributor requirements.CI & Docker
test.yml,release.yml,debricked.yml: Pinned allactions/setup-gosteps to1.27.1.alpine.Dockerfile,debian.Dockerfile: Bumped Docker base images togolang:1.27.1-*.golangci-lintinstall step tov2.13.2and updated to the/v2module path.golangci-lint v1 → v2 Migration (
.golangci.yml)version: "2"(resolves Go 1.27.1 export data decode failures onv1.62.2).goimportsandgofmtunder theformatters:section.typecheckentry and duplicatestaticcheckentry.errcheck,bodyclose, andgosec.Linter Fixes
errcheck: Handled previously ignored error returns (Close(),Remove(),RemoveAll(),Setenv(),Fprintf()) across ~20 files inauth,callgraph,client,fingerprint,io,report,resolution, andupload.bodyclose: Explicitly closed HTTP response body inbatch.go.gosec:0755→0750) in 3 locations.#nosecannotations for CLI-necessary operations (opening user files, executinggit,maven,gradle).Known Follow-ups
Tracked via
TODOcomments in.golangci.yml:goconst: Kept disabled due to pre-existing repeated string literals.staticcheck: Excluded pre-existing style/naming rules surfaced by v2 (ST1005,ST1006,ST1012,ST1019,QF1003,QF1004,QF1009,QF1012).Testing
go buildsucceeds under Go 1.27.1.golangci-lint runreports 0 issues.