Skip to content

ci: bump golangci-lint to v2.15.0 for Go 1.27 - #650

Open
Yeagerist0 wants to merge 1 commit into
aws:mainfrom
Yeagerist0:ci/lint-golangci-version
Open

Yeagerist0 wants to merge 1 commit into
aws:mainfrom
Yeagerist0:ci/lint-golangci-version

Conversation

@Yeagerist0

Copy link
Copy Markdown

The lint job fails on every new PR since go-version: 'stable' moved to Go 1.27.2:

could not import fmt ... export data version 5 is greater than maximum supported version 4 (typecheck)

golangci-lint v2.13.1 was built with an older Go and can't read 1.27 export data. I reproduced it locally with Go 1.27.2 + v2.13.1, and golangci-lint run is clean with v2.15.0 (built with go1.27.0) once one finding is fixed: the newer errcheck flags the discarded error from <-cmdDone in lambda/sigterm_test.go, so the test now logs it.

This is why #647, #648 and #649 show a red lint check although their tests pass.

Disclosure: I used Claude Code to help with this; I reproduced the failure and ran the linter myself.

The lint job installs Go with go-version "stable", which is now 1.27.2.
golangci-lint v2.13.1 was built with an older Go and cannot read the
1.27 standard library export data, so every run fails with
"could not import fmt ... export data version 5 is greater than
maximum supported version 4" before it lints anything.

v2.15.0 is built with Go 1.27. The newer errcheck also reports the
unchecked error received from cmdDone in sigterm_test.go, so log it.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.04%. Comparing base (4111853) to head (947b2aa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #650   +/-   ##
=======================================
  Coverage   82.04%   82.04%           
=======================================
  Files          37       37           
  Lines        1487     1487           
=======================================
  Hits         1220     1220           
  Misses        264      264           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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