109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
# This file contains all available configuration options
|
|
# with their default values.
|
|
|
|
# options for analysis running
|
|
run:
|
|
# default concurrency is a available CPU number
|
|
#concurrency: 4
|
|
|
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
deadline: 30m
|
|
|
|
# include test files or not, default is true
|
|
tests: false
|
|
|
|
# which dirs to skip: they won't be analyzed;
|
|
# can use regexp here: generated.*, regexp is applied on full path;
|
|
# default value is empty list, but next dirs are always skipped independently
|
|
# from this option's value:
|
|
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
|
|
skip-dirs:
|
|
- bin$
|
|
- \.git$
|
|
- etc$
|
|
- protobuf$
|
|
- scripts$
|
|
- vendor$
|
|
- ^benches/
|
|
|
|
# which files to skip: they will be analyzed, but issues from them
|
|
# won't be reported. Default value is empty list, but there is
|
|
# no need to include all autogenerated files, we confidently recognize
|
|
# autogenerated files. If it's not please let us know.
|
|
skip-files:
|
|
- "_easyjson.go"
|
|
- ".pb.go"
|
|
|
|
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
|
|
# If invoked with -mod=readonly, the go command is disallowed from the implicit
|
|
# automatic updating of go.mod described above. Instead, it fails when any changes
|
|
# to go.mod are needed. This setting is most useful to check that go.mod does
|
|
# not need updates, such as in a continuous integration and testing system.
|
|
# If invoked with -mod=vendor, the go command assumes that the vendor
|
|
# directory holds the correct copies of dependencies and ignores
|
|
# the dependency descriptions in go.mod.
|
|
modules-download-mode: mod
|
|
|
|
# all available settings of specific linters
|
|
linters-settings:
|
|
errcheck:
|
|
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
|
|
# default is false: such cases aren't reported by default.
|
|
check-blank: true
|
|
govet:
|
|
# report about shadowed variables
|
|
check-shadowing: true
|
|
golint:
|
|
# minimal confidence for issues, default is 0.8
|
|
min-confidence: 0.3
|
|
gocyclo:
|
|
# minimal code complexity to report, 30 by default (but we recommend 10-20)
|
|
min-complexity: 20
|
|
dupl:
|
|
# tokens count to trigger issue, 150 by default
|
|
threshold: 200
|
|
lll:
|
|
# max line length, lines longer will be reported. Default is 120.
|
|
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
|
|
line-length: 150
|
|
funlen:
|
|
statements: 50
|
|
lines: 150
|
|
|
|
linters:
|
|
enable-all: true
|
|
disable:
|
|
- gci
|
|
- exhaustruct
|
|
- gochecknoglobals
|
|
- whitespace
|
|
- wsl
|
|
- wrapcheck
|
|
- nlreturn
|
|
- gofmt
|
|
- gofumpt
|
|
- godox
|
|
- forbidigo
|
|
- err113
|
|
- nonamedreturns
|
|
- staticcheck
|
|
- depguard
|
|
- intrange #Пока не пересели на go1.22+
|
|
fast: false
|
|
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
|
|
exclude-rules:
|
|
# Exclude lll issues for long lines with go:generate
|
|
- linters:
|
|
- lll
|
|
source: "^//go:generate "
|
|
- linters:
|
|
- golint
|
|
text: "receiver name should be a reflection of its identity"
|
|
|
|
output:
|
|
format: tab
|