Description
The current .golangci.yml appears to still use the older golangci-lint configuration format.
With recent golangci-lint v2 releases, users who run linting against this repository need to run:
before the config works cleanly with the newer schema.
This creates a small but avoidable friction point for contributors, especially because this repository is a widely referenced Go style guide and many users may expect the lint config to work with current golangci-lint versions out of the box.
Current behavior
Running a recent golangci-lint version against the repository requires migrating the existing config first.
The current config also includes entries affected by the v2 migration, for example:
goimports is now handled under the formatters section.
golint has been removed/deprecated in newer golangci-lint versions.
- v2 configs now use an explicit
version: "2" field.
Expected behavior
The repository should include a golangci-lint v2-compatible config so contributors can run linting without needing to manually migrate the config locally.
Suggested fix
Run:
Then review the generated config and commit the migrated .golangci.yml.
This should make the repo friendlier for contributors using current golangci-lint versions while preserving the existing linting intent as much as possible.
Description
The current
.golangci.ymlappears to still use the older golangci-lint configuration format.With recent golangci-lint v2 releases, users who run linting against this repository need to run:
before the config works cleanly with the newer schema.
This creates a small but avoidable friction point for contributors, especially because this repository is a widely referenced Go style guide and many users may expect the lint config to work with current golangci-lint versions out of the box.
Current behavior
Running a recent golangci-lint version against the repository requires migrating the existing config first.
The current config also includes entries affected by the v2 migration, for example:
goimportsis now handled under theformatterssection.golinthas been removed/deprecated in newer golangci-lint versions.version: "2"field.Expected behavior
The repository should include a golangci-lint v2-compatible config so contributors can run linting without needing to manually migrate the config locally.
Suggested fix
Run:
Then review the generated config and commit the migrated
.golangci.yml.This should make the repo friendlier for contributors using current golangci-lint versions while preserving the existing linting intent as much as possible.