-
22 hours ago
-
The golangci-lint v2 output flag is valid, but the coverage-tool replacement introduces a compatibility regression for projects using Go 1.20 or older. Please address the inline finding.
-
-
22 hours ago
-
Addressed the review feedback by pinning
gocover-coberturatov1.3.0so suggested jobs remain installable on Go 1.20 and older. -
Reviewed the updated patch. The v1.3.0 pin preserves compatibility with older Go versions, and the golangci-lint v2 checkstyle output flag is valid. No remaining issues found.
-
-
-
This change does not solve the problem raised in OD-2975 . Just like gocov/go-xml , gocover-cobertura v1.3.0 only works with Go 1.20 and older. For Go 1.21 and newer, gocover-cobertura v1.4.0 or later is needed. As a result new versions of Go are still unsuported. I have not found an alternative that works for both old and newer versions of Go. As the suggestJobs function is already capable of choosing which image to use based in the Go version (see:
buildAndTest.setImage("golang:@" + JobVariableInterpolator.PREFIX_SCRIPT + GroovyScript.BUILTIN_PREFIX + DETERMINE_GO_VERSION + "@");) I suggest the version ofgocover-coberturabe chosen based on said Go version, with v1.3.0 for Go 1.20 and older, and v1.5.0 for Go 1.21 and newer.If that is not feasible, then it is worth considering which version of Go is more important to support, Go 1.20 (last release in 2024) and older, or the newer and still actively developed version that comes after go 1.21. For reference, the current stable version is 1.26.5, and latest dev version is 1.27rc2
Edit: suggestJobs does in fact not have access to the Go version as it stands, I misunderstood the way
DETERMINE_GO_VERSIONworked.
| Submitter | Work Horse |
| Target | main |
| Source | issue-2975-plugin-buildspec-go-outdated |
Replace gocov/gocov-xml with gocover-cobertura and use the golangci-lint v2 checkstyle output flag.
Fixes #2975