fix: handle error returns and unsafe type assertions in errcheck linter

This commit is contained in:
Moroka8 committed 2026-04-08 18:53:25 +07:00
1 parent 9f5a2549e2
commit 79d46b2e65
4 files changed
+161 -70

No files matched your search

+9
View File
@@ -10,6 +10,11 @@ linters:
errcheck:
check-type-assertions: true
check-blank: true
exclude-functions:
- (net.PacketConn).WriteTo
- (net.Conn).Write
- encoding/json.MarshalIndent
- (*github.com/pion/dtls/v3.Conn).SetDeadline
govet:
disable:
- fieldalignment
@@ -47,6 +52,10 @@ linters:
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- linters:
- errcheck
source: "doRequest|packetPool\\.Get"
formatters:
exclusions:
generated: lax