2021-01-11 16:29:29 +00:00
|
|
|
# This file contains all available configuration options
|
|
|
|
# with their default values.
|
2020-09-21 18:17:49 +00:00
|
|
|
|
|
|
|
# options for analysis running
|
|
|
|
run:
|
|
|
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
2023-05-03 10:44:04 +00:00
|
|
|
timeout: 10m
|
2020-09-21 18:17:49 +00:00
|
|
|
|
|
|
|
# include test files or not, default is true
|
2021-01-11 16:29:29 +00:00
|
|
|
tests: false
|
2020-09-21 18:17:49 +00:00
|
|
|
|
2021-10-04 19:53:41 +00:00
|
|
|
skip-files:
|
|
|
|
- (^|.*/)grpc/(.*)
|
2023-03-03 09:51:08 +00:00
|
|
|
|
2020-09-21 18:17:49 +00:00
|
|
|
# output configuration options
|
|
|
|
output:
|
|
|
|
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
|
|
|
|
format: tab
|
|
|
|
|
2021-01-11 16:29:29 +00:00
|
|
|
# all available settings of specific linters
|
|
|
|
linters-settings:
|
|
|
|
exhaustive:
|
|
|
|
# indicates that switch statements are to be considered exhaustive if a
|
|
|
|
# 'default' case is present, even if all enum members aren't listed in the
|
|
|
|
# switch
|
|
|
|
default-signifies-exhaustive: true
|
|
|
|
govet:
|
|
|
|
# report about shadowed variables
|
|
|
|
check-shadowing: false
|
2023-05-03 10:44:04 +00:00
|
|
|
funlen:
|
|
|
|
lines: 80 # default 60
|
|
|
|
statements: 60 # default 40
|
|
|
|
gocognit:
|
|
|
|
min-complexity: 40 # default 30
|
2021-01-11 16:29:29 +00:00
|
|
|
|
|
|
|
linters:
|
|
|
|
enable:
|
|
|
|
# mandatory linters
|
|
|
|
- govet
|
2021-10-04 19:53:41 +00:00
|
|
|
- revive
|
2021-01-11 16:29:29 +00:00
|
|
|
|
|
|
|
# some default golangci-lint linters
|
|
|
|
- errcheck
|
|
|
|
- gosimple
|
2023-05-03 10:44:04 +00:00
|
|
|
- godot
|
2021-01-11 16:29:29 +00:00
|
|
|
- ineffassign
|
|
|
|
- staticcheck
|
|
|
|
- typecheck
|
2023-05-03 10:44:04 +00:00
|
|
|
- unused
|
2021-01-11 16:29:29 +00:00
|
|
|
|
|
|
|
# extra linters
|
2023-05-03 10:44:04 +00:00
|
|
|
- bidichk
|
|
|
|
- durationcheck
|
2021-01-11 16:29:29 +00:00
|
|
|
- exhaustive
|
2023-05-03 10:44:04 +00:00
|
|
|
- exportloopref
|
2021-01-11 16:29:29 +00:00
|
|
|
- gofmt
|
|
|
|
- goimports
|
2023-05-03 10:44:04 +00:00
|
|
|
- misspell
|
|
|
|
- predeclared
|
|
|
|
- reassign
|
|
|
|
- whitespace
|
|
|
|
- containedctx
|
|
|
|
- funlen
|
|
|
|
- gocognit
|
|
|
|
- contextcheck
|
2021-01-11 16:29:29 +00:00
|
|
|
disable-all: true
|
|
|
|
fast: false
|
|
|
|
|
|
|
|
issues:
|
|
|
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
|
|
|
exclude-rules:
|
|
|
|
- path: v2 # ignore stutters in universal structures due to protobuf compatibility
|
|
|
|
linters:
|
|
|
|
- golint
|
|
|
|
text: "stutters;"
|
|
|
|
|
|
|
|
- path: grpc # ignore case errors in grpc setters due to protobuf compatibility
|
|
|
|
linters:
|
|
|
|
- golint
|
|
|
|
text: "should be"
|
2020-09-21 18:17:49 +00:00
|
|
|
|
2021-01-11 16:29:29 +00:00
|
|
|
- linters: # ignore SA6002 since we use pool of []byte, however we can switch to *bytes.Buffer
|
|
|
|
- staticcheck
|
2024-09-06 08:20:51 +00:00
|
|
|
text: "SA6002:|SA1019:"
|