forked from quic-go/quic-go
ci: update golangci-lint to v2 (#5007)
This commit is contained in:
@@ -30,7 +30,7 @@ func parseNewConnectionIDFrame(b []byte, _ protocol.Version) (*NewConnectionIDFr
|
||||
}
|
||||
b = b[l:]
|
||||
if ret > seq {
|
||||
//nolint:stylecheck
|
||||
//nolint:staticcheck // SA1021: Retire Prior To is the name of the field
|
||||
return nil, 0, fmt.Errorf("Retire Prior To value (%d) larger than Sequence Number (%d)", ret, seq)
|
||||
}
|
||||
if len(b) == 0 {
|
||||
|
||||
@@ -16,11 +16,11 @@ func ParseVersionNegotiationPacket(b []byte) (dest, src protocol.ArbitraryLenCon
|
||||
}
|
||||
b = b[n:]
|
||||
if len(b) == 0 {
|
||||
//nolint:stylecheck
|
||||
//nolint:staticcheck // SA1021: the packet is called Version Negotiation packet
|
||||
return nil, nil, nil, errors.New("Version Negotiation packet has empty version list")
|
||||
}
|
||||
if len(b)%4 != 0 {
|
||||
//nolint:stylecheck
|
||||
//nolint:staticcheck // SA1021: the packet is called Version Negotiation packet
|
||||
return nil, nil, nil, errors.New("Version Negotiation packet has a version list with an invalid length")
|
||||
}
|
||||
versions := make([]protocol.Version, len(b)/4)
|
||||
|
||||
Reference in New Issue
Block a user