1
0
mirror of https://github.com/go-kratos/kratos.git synced 2024-12-26 20:54:38 +02:00
kratos/.golangci.yml
2024-10-31 10:00:25 +08:00

74 lines
1.2 KiB
YAML

run:
timeout: 5m
modules-download-mode: readonly
linters:
disable-all: true
fast: false
enable:
- bodyclose
- dogsled
- durationcheck
- errcheck
# - copyloopvar # need upgrade to Go 1.22
- govet
- staticcheck
- gosimple
- gofmt
- gofumpt
- goconst
- goimports
- mnd
- gocyclo
- ineffassign
- lll
- prealloc
- revive
- staticcheck
- typecheck
- unused
- whitespace
- wastedassign
- unconvert
- misspell
# don't enable:
# - asciicheck
# - scopelint
# - gochecknoglobals
# - gocognit
# - godot
# - godox
# - goerr113
# - interfacer
# - maligned
# - nestif
# - prealloc
# - testpackage
# - stylecheck
# - wsl
linters-settings:
govet:
enable:
- shadow
whitespace:
multi-func: true
lll:
line-length: 160
mnd:
# 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
misspell: # Finds commonly misspelled English words in comments
locale: US