Skip to content

Commit afc9778

Browse files
bomly-guyclaude
andcommitted
ci: suppress SA5011 false positives in test files
staticcheck SA5011 fires on the t.Fatal-then-dereference pattern (e.g. `if r == nil { t.Fatal(...) }; r.Field`) because it doesn't recognise t.Fatal as a goroutine terminator in all code paths. This is a known false positive in test code — add an exclusion so the lint job stays green without touching the test files themselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 46ca514 commit afc9778

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ linters:
1717
- linters:
1818
- errcheck
1919
path: _test\.go
20+
- linters:
21+
- staticcheck
22+
text: "SA5011"
23+
path: _test\.go
2024
paths:
2125
- third_party$
2226
- builtin$

0 commit comments

Comments
 (0)