Skip to content

Commit

Permalink
ci: disable exhaustive linter for test files
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed May 7, 2024
1 parent 2ed1593 commit ce42da6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ issues:
- path: internal/qtls
linters:
- depguard
- path: _test\.go
linters:
- exhaustive
2 changes: 0 additions & 2 deletions connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ var _ = Describe("Connection", func() {
packet := &coalescedPacket{buffer: buffer}
if encLevel != protocol.Encryption1RTT {
var typ protocol.PacketType
//nolint:exhaustive
switch encLevel {
case protocol.EncryptionInitial:
typ = protocol.PacketTypeInitial
Expand Down Expand Up @@ -1313,7 +1312,6 @@ var _ = Describe("Connection", func() {
var getFrame func(protocol.ByteCount, protocol.Version) wire.Frame

BeforeEach(func() {
//nolint:exhaustive
switch encLevel {
case protocol.EncryptionInitial:
sendMode = ackhandler.SendPTOInitial
Expand Down
2 changes: 0 additions & 2 deletions integrationtests/self/handshake_drop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ var _ = Describe("Handshake drop tests", func() {
var incoming, outgoing atomic.Int32
ln, proxyPort, closeFn := startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
var p int32
//nolint:exhaustive
switch d {
case quicproxy.DirectionIncoming:
p = incoming.Add(1)
Expand All @@ -216,7 +215,6 @@ var _ = Describe("Handshake drop tests", func() {
var incoming, outgoing atomic.Int32
ln, proxyPort, closeFn := startListenerAndProxy(func(d quicproxy.Direction, _ []byte) bool {
var p int32
//nolint:exhaustive
switch d {
case quicproxy.DirectionIncoming:
p = incoming.Add(1)
Expand Down
5 changes: 0 additions & 5 deletions internal/handshake/crypto_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ var _ = Describe("Crypto Setup TLS", func() {
clientLoop:
for {
ev := client.NextEvent()
//nolint:exhaustive // only need to process a few events
switch ev.Kind {
case EventNoEvent:
break clientLoop
Expand All @@ -222,7 +221,6 @@ var _ = Describe("Crypto Setup TLS", func() {
serverLoop:
for {
ev := server.NextEvent()
//nolint:exhaustive // only need to process a few events
switch ev.Kind {
case EventNoEvent:
break serverLoop
Expand Down Expand Up @@ -549,7 +547,6 @@ var _ = Describe("Crypto Setup TLS", func() {
var tp *wire.TransportParameters
var clientReceived0RTTKeys bool
for _, ev := range clientEvents {
//nolint:exhaustive // only need to process a few events
switch ev.Kind {
case EventRestoredTransportParameters:
tp = ev.TransportParameters
Expand All @@ -563,7 +560,6 @@ var _ = Describe("Crypto Setup TLS", func() {

var serverReceived0RTTKeys bool
for _, ev := range serverEvents {
//nolint:exhaustive // only need to process a few events
switch ev.Kind {
case EventReceivedReadKeys:
serverReceived0RTTKeys = true
Expand Down Expand Up @@ -621,7 +617,6 @@ var _ = Describe("Crypto Setup TLS", func() {
var tp *wire.TransportParameters
var clientReceived0RTTKeys bool
for _, ev := range clientEvents {
//nolint:exhaustive // only need to process a few events
switch ev.Kind {
case EventRestoredTransportParameters:
tp = ev.TransportParameters
Expand Down

0 comments on commit ce42da6

Please sign in to comment.