frostfs-api-go/.golangci.yml
Evgenii Stratonikov 8ce8cd6ec2
All checks were successful
DCO action / DCO (pull_request) Successful in 55s
Tests and linters / Tests (1.19) (pull_request) Successful in 52s
Tests and linters / Tests (1.20) (pull_request) Successful in 54s
Tests and linters / Tests with -race (pull_request) Successful in 1m18s
Tests and linters / Lint (pull_request) Successful in 2m35s
[#96] .golangci.yml: Fix deprecated config options
```
WARN [config_reader] The configuration option `run.skip-files` is deprecated, please use `issues.exclude-files`.
WARN [config_reader] The configuration option `output.format` is deprecated, please use `output.formats`
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-29 15:45:01 +03:00

85 lines
1.9 KiB
YAML

# This file contains all available configuration options
# with their default values.
# options for analysis running
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 10m
# include test files or not, default is true
tests: false
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
formats:
- format: tab
# 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
funlen:
lines: 80 # default 60
statements: 60 # default 40
gocognit:
min-complexity: 40 # default 30
linters:
enable:
# mandatory linters
- govet
- revive
# some default golangci-lint linters
- errcheck
- gosimple
- godot
- ineffassign
- staticcheck
- typecheck
- unused
# extra linters
- bidichk
- durationcheck
- exhaustive
- exportloopref
- gofmt
- goimports
- misspell
- predeclared
- reassign
- whitespace
- containedctx
- funlen
- gocognit
- contextcheck
disable-all: true
fast: false
issues:
exclude-files:
- (^|.*/)grpc/(.*)
# 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"
- linters: # ignore SA6002 since we use pool of []byte, however we can switch to *bytes.Buffer
- staticcheck
text: "SA6002:"