Skip to content

Commit

Permalink
Merge #120189
Browse files Browse the repository at this point in the history
120189: testutils: add asn1 to allowed Marshal functions list r=bdarnell a=souravcrl

Release note: None
Epic: None

Release justification: We will need encoding/asn1 library to support marshalling/unmarshalling of DER encoded values used in crypto/x509 library for raw subject and subject fields. This is needed for #119958

Co-authored-by: Sourav Sarangi <[email protected]>
  • Loading branch information
craig[bot] and souravcrl committed Mar 11, 2024
2 parents 2e7ab27 + 88a50bd commit 8466258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/testutils/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ func TestLint(t *testing.T) {

if err := stream.ForEach(stream.Sequence(
filter,
stream.GrepNot(`(json|jsonpb|yaml|protoutil|xml|\.Field|ewkb|wkb|wkt)\.Marshal\(`),
stream.GrepNot(`(json|jsonpb|yaml|protoutil|xml|\.Field|ewkb|wkb|wkt|asn1)\.Marshal\(`),
), func(s string) {
t.Errorf("\n%s <- forbidden; use 'protoutil.Marshal' instead", s)
}); err != nil {
Expand Down Expand Up @@ -1326,7 +1326,7 @@ func TestLint(t *testing.T) {

if err := stream.ForEach(stream.Sequence(
filter,
stream.GrepNot(`(json|jsonpb|yaml|xml|protoutil|toml|Codec|ewkb|wkb|wkt)\.Unmarshal\(`),
stream.GrepNot(`(json|jsonpb|yaml|xml|protoutil|toml|Codec|ewkb|wkb|wkt|asn1)\.Unmarshal\(`),
), func(s string) {
t.Errorf("\n%s <- forbidden; use 'protoutil.Unmarshal' instead", s)
}); err != nil {
Expand Down

0 comments on commit 8466258

Please sign in to comment.