ci: update golangci-lint to v2#1341
Merged
dhui merged 3 commits intogolang-migrate:masterfrom Dec 14, 2025
Merged
Conversation
update method: ``` golangci-lint migrate golangci-lint run --fix ``` and fix the last ones manually
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates golangci-lint from v1 to v2, applying automated linting fixes and migrating the configuration format. The changes align the codebase with modern Go conventions and golangci-lint v2 requirements.
- Updates golangci-lint configuration to v2 format with separated linters and formatters sections
- Standardizes error messages to follow Go conventions (lowercase start, no trailing periods)
- Modernizes string operations by replacing
strings.Replace(..., -1)withstrings.ReplaceAll()
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.golangci.yml |
Migrates configuration to v2 format, separates formatters from linters |
.github/workflows/ci.yaml |
Updates golangci-lint-action to v9 and version to v2.6.2 |
testing/docker.go |
Lowercases error message starts (5 instances) |
source/gitlab/gitlab.go |
Simplifies embedded struct field access |
internal/cli/commands.go |
Lowercases error messages and improves punctuation |
database/testing/testing.go |
Lowercases error message start |
database/sqlserver/sqlserver.go |
Removes trailing period from error message |
database/snowflake/snowflake.go |
Replaces strings.Replace with strings.ReplaceAll |
database/redshift/redshift.go |
Replaces strings.Replace with strings.ReplaceAll |
database/redshift/redshift_test.go |
Updates test code to use strings.ReplaceAll |
database/postgres/postgres.go |
Lowercases error messages and uses strings.ReplaceAll |
database/postgres/postgres_test.go |
Updates test code to use strings.ReplaceAll |
database/pgx/v5/pgx.go |
Lowercases error messages and uses strings.ReplaceAll (2 locations) |
database/pgx/v5/pgx_test.go |
Updates test code to use strings.ReplaceAll |
database/pgx/pgx.go |
Lowercases error messages and uses strings.ReplaceAll (3 locations) |
database/pgx/pgx_test.go |
Updates test code to use strings.ReplaceAll |
database/mysql/mysql.go |
Lowercases error message start |
database/clickhouse/clickhouse.go |
Replaces strings.Replace with strings.ReplaceAll |
database/cassandra/cassandra.go |
Lowercases error message start |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dhui
approved these changes
Dec 14, 2025
Member
dhui
left a comment
There was a problem hiding this comment.
@PascalBourdier Thanks for the PR!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update method:
and fix the last ones manually