mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 08:02:18 +02:00
872fea0e14
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. Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
52 lines
806 B
YAML
52 lines
806 B
YAML
linters-settings:
|
|
gofmt:
|
|
simplify: true
|
|
misspell:
|
|
locale: US
|
|
gofumpt:
|
|
extra-rules: true
|
|
forbidigo:
|
|
forbid:
|
|
- context\.WithCancel$
|
|
- ^print.*$
|
|
- panic
|
|
errorlint:
|
|
errorf-multi: true
|
|
|
|
linters:
|
|
disable-all: true
|
|
enable:
|
|
- bidichk
|
|
- errcheck
|
|
- gofmt
|
|
- goimports
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- misspell
|
|
- revive
|
|
- staticcheck
|
|
- typecheck
|
|
- unused
|
|
- whitespace
|
|
- gofumpt
|
|
- errorlint
|
|
- forbidigo
|
|
- zerologlint
|
|
|
|
run:
|
|
timeout: 5m
|
|
|
|
issues:
|
|
exclude-rules:
|
|
# gin force us to use string as context key
|
|
- path: server/store/context.go
|
|
linters:
|
|
- staticcheck
|
|
- revive
|
|
|
|
# let cli use print and panic
|
|
- path: 'cmd/*|cli/*'
|
|
linters:
|
|
- forbidigo
|