1
0
mirror of https://github.com/go-kratos/kratos.git synced 2024-12-28 21:09:04 +02:00
kratos/.golangci.yml
Mystic 7d9a0d1dee
build(go): upgrade to go 1.19 (#2905)
BREAKING CHANGE: upgrade go 1.19
2023-07-28 18:08:49 +08:00

69 lines
1.1 KiB
YAML

run:
timeout: 5m
modules-download-mode: readonly
linters:
disable-all: true
fast: false
enable:
- bodyclose
- dogsled
- durationcheck
- errcheck
- exportloopref
- govet
- gosimple
- gofmt
- gofumpt
- goconst
- goimports
- gomnd
- gocyclo
- ineffassign
- lll
- prealloc
- revive
- staticcheck
- typecheck
- unused
- whitespace
- wastedassign
- unconvert
# don't enable:
# - asciicheck
# - scopelint
# - gochecknoglobals
# - gocognit
# - godot
# - godox
# - goerr113
# - interfacer
# - maligned
# - nestif
# - prealloc
# - testpackage
# - stylrcheck
# - wsl
linters-settings:
govet:
check-shadowing: true
whitespace:
multi-func: true
lll:
line-length: 160
gomnd:
# don't include the "operation", "argument" and "assign"
checks:
- case
- condition
- return
goconst:
ignore-tests: true
gocyclo:
# recommend 10-20
min-complexity: 50
goimports:
local-prefixes: github.com/go-kratos # Put imports beginning with prefix after 3rd-party packages