2023-04-18 15:00:31 +00:00
|
|
|
# This file contains all available configuration options
|
|
|
|
# with their default values.
|
|
|
|
|
|
|
|
# options for analysis running
|
2020-12-07 17:20:23 +00:00
|
|
|
run:
|
2023-04-18 15:00:31 +00:00
|
|
|
# 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
|
2020-12-07 17:20:23 +00:00
|
|
|
tests: false
|
|
|
|
|
2023-04-18 15:00:31 +00:00
|
|
|
# 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
|
|
|
|
|
2020-12-07 17:20:23 +00:00
|
|
|
linters:
|
|
|
|
enable-all: true
|
|
|
|
disable:
|
2023-04-18 15:00:31 +00:00
|
|
|
- gci
|
|
|
|
- exhaustruct
|
2020-12-07 17:20:23 +00:00
|
|
|
- gochecknoglobals
|
|
|
|
- whitespace
|
2023-04-18 15:00:31 +00:00
|
|
|
- wsl
|
2020-12-07 17:20:23 +00:00
|
|
|
- wrapcheck
|
2023-04-18 15:00:31 +00:00
|
|
|
- nlreturn
|
|
|
|
- gofmt
|
|
|
|
- gofumpt
|
|
|
|
- godox
|
|
|
|
- forbidigo
|
2024-09-10 10:14:13 +00:00
|
|
|
- err113
|
2023-04-18 15:00:31 +00:00
|
|
|
- nonamedreturns
|
2020-12-10 10:02:17 +00:00
|
|
|
- staticcheck
|
2024-09-10 09:58:51 +00:00
|
|
|
- depguard
|
2024-09-10 10:14:13 +00:00
|
|
|
- intrange #Пока не пересели на go1.22+
|
2023-04-18 15:00:31 +00:00
|
|
|
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
|