mirror of
https://github.com/appleboy/drone-discord.git
synced 2026-06-04 10:23:47 +08:00
691536f46b
- Update golangci-lint-action used version from `v6` to `v7` - Set specific golangci-lint version to `v2.0` instead of latest - Remove `run` section with timeout setting in `.golangci.yaml` - Eliminate multiple linters (`errcheck`, `gci`, `gofmt`, `goimports`) from `.golangci.yaml` - Change `linters-settings` to `settings` in `.golangci.yaml` - Add `int-conversion: true` to `perfsprint` settings - Add new exclusion settings for generated code, preset rules, and specific paths under `exclusions` in `.golangci.yaml` - Incorporate formatter settings with enabled formatters and exclusions for certain paths in `.golangci.yaml` Signed-off-by: appleboy <appleboy.tw@gmail.com>
55 lines
875 B
YAML
55 lines
875 B
YAML
version: "2"
|
|
linters:
|
|
enable:
|
|
- asciicheck
|
|
- durationcheck
|
|
- errorlint
|
|
- gosec
|
|
- misspell
|
|
- nakedret
|
|
- nilerr
|
|
- nolintlint
|
|
- perfsprint
|
|
- revive
|
|
- usestdlibvars
|
|
- wastedassign
|
|
settings:
|
|
gosec:
|
|
includes:
|
|
- G102
|
|
- G106
|
|
- G108
|
|
- G109
|
|
- G111
|
|
- G112
|
|
- G201
|
|
- G203
|
|
perfsprint:
|
|
int-conversion: true
|
|
err-error: true
|
|
errorf: true
|
|
sprintf1: true
|
|
strconcat: true
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- common-false-positives
|
|
- legacy
|
|
- std-error-handling
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- gofmt
|
|
- goimports
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|