ci: update golangci-lint to v2 (#5007)

This commit is contained in:
Marten Seemann
2025-03-30 12:16:14 +07:00
committed by GitHub
parent 4290638b55
commit 1d8f3f281a
24 changed files with 126 additions and 116 deletions

View File

@@ -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 {

View File

@@ -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)