diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0dc0bbf906b..504180ed5e0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,4 +28,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.41.1 + version: v1.45.2 diff --git a/.golangci.yml b/.golangci.yml index 05ddb79ac92..2589c053892 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,7 +28,6 @@ linters: - ineffassign - misspell - prealloc - - scopelint - staticcheck - stylecheck - structcheck diff --git a/fuzzing/handshake/fuzz.go b/fuzzing/handshake/fuzz.go index 8c0d0ce46a8..c761ad0ca41 100644 --- a/fuzzing/handshake/fuzz.go +++ b/fuzzing/handshake/fuzz.go @@ -300,7 +300,6 @@ func runHandshake(runConfig [confLen]byte, messageConfig uint8, clientConf *tls. serverConf.ClientAuth = getClientAuth(runConfig[1] & 0b00000111) serverConf.CipherSuites = getSuites(runConfig[1] >> 6) serverConf.SessionTicketsDisabled = helper.NthBit(runConfig[1], 3) - clientConf.PreferServerCipherSuites = helper.NthBit(runConfig[1], 4) if helper.NthBit(runConfig[2], 0) { clientConf.RootCAs = x509.NewCertPool() } diff --git a/internal/handshake/crypto_setup_test.go b/internal/handshake/crypto_setup_test.go index ec0e4e1e40d..5720321a8f8 100644 --- a/internal/handshake/crypto_setup_test.go +++ b/internal/handshake/crypto_setup_test.go @@ -260,7 +260,8 @@ var _ = Describe("Crypto Setup TLS", func() { } handshake := func(client CryptoSetup, cChunkChan <-chan chunk, - server CryptoSetup, sChunkChan <-chan chunk) { + server CryptoSetup, sChunkChan <-chan chunk, + ) { done := make(chan struct{}) go func() { defer GinkgoRecover() diff --git a/internal/qerr/errors_test.go b/internal/qerr/errors_test.go index b2a3cca5faf..5a825b8c4be 100644 --- a/internal/qerr/errors_test.go +++ b/internal/qerr/errors_test.go @@ -73,7 +73,6 @@ var _ = Describe("QUIC Errors", func() { nerr, ok := err.(net.Error) Expect(ok).To(BeTrue()) Expect(nerr.Timeout()).To(BeTrue()) - Expect(nerr.Temporary()).To(BeFalse()) Expect(err.Error()).To(Equal("timeout: handshake did not complete in time")) }) @@ -84,7 +83,6 @@ var _ = Describe("QUIC Errors", func() { nerr, ok := err.(net.Error) Expect(ok).To(BeTrue()) Expect(nerr.Timeout()).To(BeTrue()) - Expect(nerr.Temporary()).To(BeFalse()) Expect(err.Error()).To(Equal("timeout: no recent network activity")) }) }) @@ -112,7 +110,6 @@ var _ = Describe("QUIC Errors", func() { nerr, ok := err.(net.Error) Expect(ok).To(BeTrue()) Expect(nerr.Timeout()).To(BeFalse()) - Expect(nerr.Temporary()).To(BeTrue()) }) }) diff --git a/packet_handler_map.go b/packet_handler_map.go index 23a8585661f..6975d5a25ed 100644 --- a/packet_handler_map.go +++ b/packet_handler_map.go @@ -344,6 +344,10 @@ func (h *packetHandlerMap) listen() { defer close(h.listening) for { p, err := h.conn.ReadPacket() + //nolint:staticcheck // SA1019 ignore this! + // TODO: This code is used to ignore wsa errors on Windows. + // Since net.Error.Temporary is deprecated as of Go 1.18, we should find a better solution. + // See https://github.com/lucas-clemente/quic-go/issues/1737 for details. if nerr, ok := err.(net.Error); ok && nerr.Temporary() { h.logger.Debugf("Temporary error reading from conn: %w", err) continue diff --git a/receive_stream_test.go b/receive_stream_test.go index 088be4297d1..51a8414f230 100644 --- a/receive_stream_test.go +++ b/receive_stream_test.go @@ -218,7 +218,6 @@ var _ = Describe("Receive Stream", func() { Context("deadlines", func() { It("the deadline error has the right net.Error properties", func() { - Expect(errDeadline.Temporary()).To(BeTrue()) Expect(errDeadline.Timeout()).To(BeTrue()) Expect(errDeadline).To(MatchError("deadline exceeded")) }) diff --git a/stream_test.go b/stream_test.go index c3d0f016208..b382efee99b 100644 --- a/stream_test.go +++ b/stream_test.go @@ -99,7 +99,6 @@ var _ = Describe("Stream", func() { var _ = Describe("Deadline Error", func() { It("is a net.Error that wraps os.ErrDeadlineError", func() { err := deadlineError{} - Expect(err.Temporary()).To(BeTrue()) Expect(err.Timeout()).To(BeTrue()) Expect(errors.Is(err, os.ErrDeadlineExceeded)).To(BeTrue()) Expect(errors.Unwrap(err)).To(Equal(os.ErrDeadlineExceeded)) diff --git a/streams_map_test.go b/streams_map_test.go index ffce136b750..29ce7efc1f8 100644 --- a/streams_map_test.go +++ b/streams_map_test.go @@ -38,7 +38,6 @@ func expectTooManyStreamsError(err error) { ExpectWithOffset(1, err.Error()).To(Equal(errTooManyOpenStreams.Error())) nerr, ok := err.(net.Error) ExpectWithOffset(1, ok).To(BeTrue()) - ExpectWithOffset(1, nerr.Temporary()).To(BeTrue()) ExpectWithOffset(1, nerr.Timeout()).To(BeFalse()) }