- Добавить nilerr, contextcheck, noctx, unconvert, unparam, gocritic, prealloc; убрать пресет std-error-handling и check-blank - Заменить net.Dial/Listen/ListenPacket на context-aware варианты в tcpfwd, bondserver, tcpfwdserver, udprelay, udpserver - Убрать параметр typ из writeToNextLane (всегда FrameData) - Убрать лишний DohEndpoint из возвращаемых значений forwardRaw - Анонимные receivers для методов без доступа к self (logx, vkauth, doh) - Переименовать неиспользуемые параметры в _ (bondclient, bondserver, netconn, dtlsdial тесты) - cmd/client: unlambda fix StreamsAlive → connectedStreams.Load
77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
version: "2"
|
|
run:
|
|
tests: true
|
|
linters:
|
|
enable:
|
|
- bodyclose
|
|
- misspell
|
|
- revive
|
|
- nilerr
|
|
- contextcheck
|
|
- noctx
|
|
- unconvert
|
|
- unparam
|
|
- gocritic
|
|
- prealloc
|
|
settings:
|
|
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"
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|
|
formatters:
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- third_party$
|
|
- builtin$
|
|
- examples$
|