Skip to content

Commit

Permalink
Remove go versions from .golangci.yml (#27953)
Browse files Browse the repository at this point in the history
1. `linter.lang-version` is deprecated in favor of `run.go`
2. `run.go` defaults to the version in `go.mod` as per
[docs](https://golangci-lint.run/usage/configuration/#run-configuration):

```yaml
  # Define the Go version limit.
  # Mainly related to generics support since go1.18.
  # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
  go: '1.19'
```

So in summary, we don't need these versions in the file as long as we
keep the version in go.mod bumped.
  • Loading branch information
silverwind authored Nov 7, 2023
1 parent 10a6ebb commit 2e6af43
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ linters:
fast: false

run:
go: "1.21"
timeout: 10m
skip-dirs:
- node_modules
Expand Down Expand Up @@ -75,7 +74,6 @@ linters-settings:
- name: modifies-value-receiver
gofumpt:
extra-rules: true
lang-version: "1.21"
depguard:
rules:
main:
Expand Down

0 comments on commit 2e6af43

Please sign in to comment.