Repository navigation
Update golangci-lint to v2.11 - #1657
Conversation
There was a problem hiding this comment.
Pull request overview
Upgrades the repository’s GolangCI-Lint tooling to v2.11 (needed for Go 1.25 compatibility) and applies the associated repo-wide lint-driven refactors/expectation updates without intended behavioral changes.
Changes:
- Update GolangCI-Lint CI workflow to use
golangci/golangci-lint-action@v9withv2.11, and migrate.golangci.ymlto the v2 config format. - Apply widespread Go lint cleanups (receiver renames away from
this, minor simplifications, and error-string casing/format changes). - Update local test
expect_failuregolden outputs to match updated error/log formatting.
Show a summary per file
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
go/sql/builder.go:212
BuildRangeComparisonreturns errors that mentionGetEqualsComparison, which is misleading (and doesn't match theBuild*naming used here). Updating these messages will make it much easier to understand failures in range comparison construction.
func BuildRangeComparison(columns []string, values []string, args []interface{}, comparisonSign ValueComparisonSign) (result string, explodedArgs []interface{}, err error) {
if len(columns) == 0 {
return "", explodedArgs, fmt.Errorf("got 0 columns in GetRangeComparison")
}
if len(columns) != len(values) {
return "", explodedArgs, fmt.Errorf("got %d columns but %d values in GetEqualsComparison", len(columns), len(values))
}
if len(columns) != len(args) {
return "", explodedArgs, fmt.Errorf("got %d columns but %d args in GetEqualsComparison", len(columns), len(args))
}
.golangci.yml:6
- The previous
run.timeout: 5msetting was removed. Since the workflow does not pass an explicit--timeoutand larger repos can exceed golangci-lint's default, consider restoring an explicit timeout (either in.golangci.ymlunderrun:or via the GitHub Action config) to avoid flaky CI timeouts.
version: "2"
linters:
enable:
- bodyclose
- containedctx
- contextcheck
- Files reviewed: 36/37 changed files
- Comments generated: 5
| func (this *ColumnList) Equals(other *ColumnList) bool { | ||
| return reflect.DeepEqual(this.Columns, other.Columns) | ||
| func (cl *ColumnList) Equals(other *ColumnList) bool { | ||
| return reflect.DeepEqual(cl.Columns, other.Columns) |
There was a problem hiding this comment.
ColumnList.Equals is comparing the Columns method values (cl.Columns / other.Columns) instead of the underlying slices, so it will always return false (functions are only DeepEqual when both are nil). It should compare cl.columns/other.columns (or cl.Columns()/other.Columns()), and ideally handle other == nil to avoid panics if added later.
There was a problem hiding this comment.
out of scope, I don't want to change any logic

Upgrade golangci-lint to v2.11 since the current version won't work with go1.25 (#1668). This requires a lot of trivial changes to satisfy the linters. No logic is changed in this PR.
script/cibuildreturns with no formatting errors, build errors or unit test errors.