G
YouTube TikTok Games
Skip to content

ci(lint): migrate to golangci-lint v2 and action v9 - #1001

Open
omercnet wants to merge 1 commit into
mainfrom
ci/golangci-lint-v2
Open

omercnet wants to merge 1 commit into
mainfrom
ci/golangci-lint-v2

Conversation

@omercnet

Copy link
Copy Markdown
Member

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:

  • action pinned to v9.3.0, golangci-lint to v2.15.0
  • scripts/lint/.golangci.yml migrated with golangci-lint migrate (gofmt and goimports move to formatters)

golangci-lint run --config scripts/lint/.golangci.yml with v2.15.0 reports 0 issues locally.

Supersedes #409, #410, #411, #417.

@shuni-bot

shuni-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🐕 Shuni Review

This PR moves the CI lint action to golangci-lint-action v9.3.0 and golangci-lint v2.15.0, and rewrites scripts/lint/.golangci.yml in the v2 config format.

Actionable comments posted: 1

  • 1 🟡 Minor: scripts/lint/lint.sh still installs v1.64.8 and uses v1-only CLI flags, so it can't run this v2 config

Merge risk: 🟢 Low: CI itself is consistent; only the in-repo local lint script is left behind.

See inline comments for details.

🤖 Model: claude-opus-5.5 · Effort: high


Review scope: Full review

Reviewed files (2)
  • .github/actions/lint/action.yml
  • scripts/lint/.golangci.yml

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-opus-5.5 · Effort: high

Copilot AI balanced review requested due to automatic review settings October 22, 2026 08:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shuni-bot shuni-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐕 Shuni review: 1 inline finding. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

excludes:
- "G104"

version: "2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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)

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