Skip to content

Update .golangci.yml to golangci-lint v2 config format #268

@prdai

Description

@prdai

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:

golangci-lint migrate

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:

golangci-lint migrate

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions