]> source.dussan.org Git - gitea.git/commitdiff
Remove go versions from .golangci.yml (#27953)
authorsilverwind <me@silverwind.io>
Tue, 7 Nov 2023 21:03:27 +0000 (22:03 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Nov 2023 21:03:27 +0000 (22:03 +0100)
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.

.golangci.yml

index 069dc13c991e62cee71794a4d9f37f228a3e64fb..d6ce37f49afab91d8aa04e9fb8575c3df8369c96 100644 (file)
@@ -29,7 +29,6 @@ linters:
   fast: false
 
 run:
-  go: "1.21"
   timeout: 10m
   skip-dirs:
     - node_modules
@@ -75,7 +74,6 @@ linters-settings:
       - name: modifies-value-receiver
   gofumpt:
     extra-rules: true
-    lang-version: "1.21"
   depguard:
     rules:
       main: