Skip to content

Fix golangci-lint failure by updating Go version to 1.18#46

Merged
tsub merged 1 commit into
mainfrom
fix/update-go-version-for-golangci-lint
Mar 10, 2026
Merged

Fix golangci-lint failure by updating Go version to 1.18#46
tsub merged 1 commit into
mainfrom
fix/update-go-version-for-golangci-lint

Conversation

@tsub

@tsub tsub commented Mar 10, 2026

Copy link
Copy Markdown
Member

Note

Generated by claude-code

Why?

golangci-lint 2.11.2 uses the -buildvcs flag internally, which was introduced in Go 1.18.
Since go.mod specified go 1.17, actions/setup-go set up Go 1.17 and CI failed with:

flag provided but not defined: -buildvcs

How?

Updated the go directive in go.mod from 1.17 to 1.18.

golangci-lint 2.11.2 が `-buildvcs` フラグを使用するが、このフラグは Go 1.18 で追加された。
go.mod の Go バージョンを 1.17 から 1.18 に更新することで修正する。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 10, 2026 07:40
@tsub tsub self-assigned this Mar 10, 2026
@tsub tsub merged commit da82077 into main Mar 10, 2026
4 checks passed
@tsub tsub deleted the fix/update-go-version-for-golangci-lint branch March 10, 2026 07:40

Copilot AI 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.

Pull request overview

CI の golangci-lint 失敗(Go 1.17 環境で -buildvcs が未対応)を解消するため、リポジトリの最小 Go バージョンを 1.18 に引き上げる変更です。

Changes:

  • go.modgo ディレクティブを 1.17 から 1.18 に更新

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
module github.com/socialplusjp/datadog-sidekiq

go 1.17
go 1.18

Copilot AI Mar 10, 2026

Copy link

Choose a reason for hiding this comment

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

After raising the go directive to 1.18, the stated development requirement in README.md is now outdated (it currently says Go >= 1.17.0). Consider updating the documentation to reflect the new minimum supported Go version.

Suggested change
go 1.18
go 1.17

Copilot uses AI. Check for mistakes.
Comment thread go.mod
module github.com/socialplusjp/datadog-sidekiq

go 1.17
go 1.18

Copilot AI Mar 10, 2026

Copy link

Choose a reason for hiding this comment

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

go.mod now requires Go 1.18, but the Docker build still uses FROM golang:1.17-alpine as builder (Dockerfile:1). With this change, go build in the Dockerfile will fail because Go 1.17 can’t build modules declaring go 1.18. Please bump the builder image to Go 1.18+ (and ensure the release workflow’s Docker build continues to succeed).

Copilot uses AI. Check for mistakes.
@tsub

tsub commented Mar 10, 2026

Copy link
Copy Markdown
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

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