Files

98 lines
2.0 KiB
YAML

version: "2"
run:
tests: true
linters:
enable:
- bodyclose
- misspell
- revive
- nilerr
- contextcheck
- noctx
- unconvert
- unparam
- gocritic
- prealloc
- gosec
- staticcheck
- cyclop
- funlen
- nestif
settings:
cyclop:
max-complexity: 15
funlen:
lines: -1
statements: 60
nestif:
min-complexity: 5
errcheck:
check-type-assertions: true
exclude-functions:
- (net.PacketConn).WriteTo
- encoding/json.MarshalIndent
- (*github.com/pion/dtls/v3.Conn).SetDeadline
govet:
disable:
- fieldalignment
enable-all: true
revive:
rules:
- name: blank-imports
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: unused-parameter
- name: superfluous-else
- name: unused-receiver
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
paths:
- third_party$
- builtin$
- examples$
rules:
- linters:
- errcheck
source: "doRequest|packetPool\\.Get"
- linters:
- gocritic
path: "^cmd/"
text: "exitAfterDefer"
- linters:
- cyclop
- funlen
- nestif
path: "_test\\.go$"
- linters:
- cyclop
- nestif
path: "internal/provider/vk/internal/(captcha|vkauth)/"
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$