This linter helps us find unneeded nolint statements.
- govet
- ineffassign
- misspell
+ - nolintlint
- prealloc
- staticcheck
- unconvert
}
// blocks until the early connection can be used
-//
-//nolint:unused // False positive: This function is used by Transport.doDial.
func (c *Conn) earlyConnReady() <-chan struct{} {
return c.earlyConnReadyChan
}
c.pacingDeadline = time.Time{}
sendMode := c.sentPacketHandler.SendMode(now)
- //nolint:exhaustive // No need to handle pacing limited here.
switch sendMode {
case ackhandler.SendAny:
return c.sendPackets(now)
return &tlsServerConf.Certificates[0], nil
}
- ctx, cancel := context.WithCancel(context.WithValue(context.Background(), "foo", "bar")) //nolint:staticcheck
+ ctx, cancel := context.WithCancel(context.WithValue(context.Background(), "foo", "bar"))
conn, err := quic.Dial(
ctx,
newUDPConnLocalhost(t),
func(s *http3.Server) {
s.ConnContext = func(ctx context.Context, c *quic.Conn) context.Context {
connCtxChan <- ctx
- ctx = context.WithValue(ctx, "foo", "bar") //nolint:staticcheck
+ ctx = context.WithValue(ctx, "foo", "bar")
return ctx
}
},
}
func (vn Version) String() string {
- //nolint:exhaustive
switch vn {
case VersionUnknown:
return "unknown"
var packetType uint8
if v == protocol.Version2 {
- //nolint:exhaustive
switch h.Type {
case protocol.PacketTypeInitial:
packetType = 0b01
packetType = 0b00
}
} else {
- //nolint:exhaustive
switch h.Type {
case protocol.PacketTypeInitial:
packetType = 0b00
type ecn logging.ECN
func (e ecn) String() string {
- //nolint:exhaustive // The unsupported value is never logged.
switch logging.ECN(e) {
case logging.ECTNot:
return "Not-ECT"