Skip to content

Conversation

@PascalBourdier
Copy link
Contributor

follow linter advice with:

golangci-lint run --fix

Copilot AI review requested due to automatic review settings December 15, 2025 08:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the modernize linter to the golangci-lint configuration and applies its recommendations throughout the codebase. The modernize linter suggests using modern Go idioms that are available in Go 1.22+ (the project uses Go 1.24.0).

Key changes:

  • Enabled the modernize linter in .golangci.yml
  • Replaced interface{} with any alias throughout the codebase for better readability
  • Removed unnecessary range variable captures (automatic in Go 1.22+)
  • Replaced sort.Slice with more efficient slices.Sort
  • Updated benchmark loops to use b.Loop() method
  • Simplified loop syntax using for i := range n pattern

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.golangci.yml Added modernize linter to the enabled linters list
testing/testing.go Removed unnecessary range variable capture comment and code
dktesting/dktesting.go Removed unnecessary range variable capture comment and code
source/stub/stub.go Replaced interface{} with any in struct field and function parameter
source/migration.go Replaced sort.Slice with slices.Sort and added slices import
source/go_bindata/go-bindata.go Replaced interface{} with any in function parameter
source/file/file_test.go Simplified loop syntax to for i := range 1000, replaced benchmark loops with b.Loop()
migrate.go Replaced interface{} with any in channel types and function parameters
migrate_test.go Replaced interface{} with any in channel type and simplified loop syntax
log.go Replaced interface{} with any in Logger interface method signature
internal/cli/log.go Replaced interface{} with any in Log method signatures
database/stub/stub.go Replaced interface{} with any in struct field and function parameter
database/spanner/spanner.go Replaced interface{} with any in slice literal
database/rqlite/rqlite.go Replaced interface{} with any in slice literal
database/postgres/postgres_test.go Simplified loop syntax to for i := range concurrency
database/pgx/v5/pgx_test.go Simplified loop syntax to for i := range concurrency
database/pgx/pgx_test.go Simplified loop syntax to for i := range concurrency
database/neo4j/neo4j.go Replaced interface{} with any in function signatures and map types
database/driver_test.go Replaced interface{} with any in variable declaration

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

follow linter advice with:

```bash
golangci-lint run --fix
```
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.

1 participant