Repository navigation
Conversation
🐕 Shuni ReviewThis PR moves the CI lint action to golangci-lint-action v9.3.0 and golangci-lint v2.15.0, and rewrites Actionable comments posted: 1
Merge risk: 🟢 Low: CI itself is consistent; only the in-repo local lint script is left behind. See inline comments for details. 🤖 Model: Review scope: Full review Reviewed files (2)
🐕 Review complete — View session on Shuni Portal 🐾 🤖 Model: |
| excludes: | ||
| - "G104" | ||
|
|
||
| version: "2" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick fix
Update scripts/lint/lint.sh so it runs golangci-lint v2 with this config
lint_run_golangci in scripts/lint/lint.sh still pins GOLANG_CI_SUPPORTED_VERSION="1.64.8". By default it loads ${CURRENT_DIR}/.golangci.yml, which is this file. golangci-lint v1 won't load a version: "2" config, so the local lint run now fails. Letting Renovate bump just that version (the # renovate: annotation) won't fix it either. The script also installs from the v1 module path github.com/golangci/golangci-lint/cmd/golangci-lint (v2 lives at .../v2/cmd/golangci-lint), and it passes --out-format colored-line-number, a flag v2 removed.
Proposed fix
GOLANG_CI_SUPPORTED_VERSION="2.15.0"
...
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v${GOLANG_CI_SUPPORTED_VERSION}
...
lintresult=$(golangci-lint run --config ${golang_cli_config} --output.text.path=stdout --output.text.colors)
golangci-lint-action v7+ requires golangci-lint v2, and the v2 pin needs a v2 config. The separate Renovate PRs (#409, #410, #411, #417) each bump only one half and fail. This lands them together:
scripts/lint/.golangci.ymlmigrated withgolangci-lint migrate(gofmt and goimports move toformatters)golangci-lint run --config scripts/lint/.golangci.ymlwith v2.15.0 reports 0 issues locally.Supersedes #409, #410, #411, #417.