Skip to content

ci: fix golangci-lint failing due to Go toolchain mismatch - #651

Merged
pirog-spb merged 3 commits into
mainfrom
fix/ci-golangci
Oct 3, 2026
Merged

pirog-spb merged 3 commits into
mainfrom
fix/ci-golangci

Conversation

@pirog-spb

Copy link
Copy Markdown
Collaborator

No description provided.

pirog-spb added 3 commits October 3, 2026 14:17
The Test workflow has been failing on the golangci-lint step since
February 2026: raw-upf-presetup resolves go-version '>=1.21.0' to the
latest Go (1.26.8), while golangci-lint-action@v3 installs golangci-lint
v1.x built with Go 1.24. Its typecheck then fails on the Go 1.26 stdlib
(fips140only_go1.26.go: file requires newer Go version go1.26) and
reports bogus errors in the swag dependency.

- Pin Go to go.mod (go-version-file) and bump setup-go v4 -> v5
- Bump golangci-lint-action v3 -> v8 with pinned golangci-lint v2.6.2
- Bump checkout v3 -> v4

Also removes Node.js 20 / EOL action deprecation warnings.

Signed-off-by: pirog-spb <[email protected]>
With golangci-lint upgraded to v2.6.2 (previous commit), its stricter
defaults flag issues the old v1 version did not report:

- errcheck: check or explicitly ignore Close() errors in defers and
  cleanup paths (main.go, gtp_path_manager.go, objects.go, tests);
  PfcpConnection.Close now returns the underlying error
- staticcheck QF1008: drop redundant embedded IpEntrypointObjects
  selector in api/rest handlers
- staticcheck ST1005: lowercase error strings, drop trailing periods
  (core)
- staticcheck QF1012: use fmt.Fprintf instead of
  WriteString(fmt.Sprintf(...)) in display helpers
- staticcheck QF1003: use a tagged switch on far.Type
- staticcheck ST1008: return error as the last argument in DeleteUrr
  (implementation, interface, callers and mock updated)

Verified in a Linux container matching CI (clang/llvm, go generate,
golangci-lint v2.6.2): 0 lint issues, build and go test ./cmd/... pass.

Signed-off-by: pirog-spb <[email protected]>
…t size from strconv.Atoi to a lower bit size type uint32 without an upper bound check

Signed-off-by: pirog-spb <[email protected]>
@pirog-spb
pirog-spb merged commit 6f3c030 into main Oct 3, 2026
12 of 14 checks passed
pirog-spb added a commit that referenced this pull request Oct 31, 2026
Signed-off-by: pirog-spb <[email protected]>
Co-authored-by: pirog-spb <[email protected]>
(cherry picked from commit 6f3c030)
Signed-off-by: pirog-spb <[email protected]>
pirog-spb added a commit that referenced this pull request Oct 31, 2026
Signed-off-by: pirog-spb <[email protected]>
Co-authored-by: pirog-spb <[email protected]>
(cherry picked from commit 6f3c030)
Signed-off-by: pirog-spb <[email protected]>
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.

1 participant