From 9a73f08f326be18a62a950e4afc4f17d8fbbc231 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 14 Aug 2024 15:26:15 +0200 Subject: [PATCH] pattern: ignore SA1019 for valid use of ast.Object --- pattern/match.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pattern/match.go b/pattern/match.go index 4fb4f8ec..3c4b5ffb 100644 --- a/pattern/match.go +++ b/pattern/match.go @@ -692,7 +692,8 @@ func (texpr TrulyConstantExpression) Match(m *Matcher, node interface{}) (interf var ( // Types of fields in go/ast structs that we want to skip - rtTokPos = reflect.TypeOf(token.Pos(0)) + rtTokPos = reflect.TypeOf(token.Pos(0)) + //lint:ignore SA1019 It's deprecated, but we still want to skip the field. rtObject = reflect.TypeOf((*ast.Object)(nil)) rtCommentGroup = reflect.TypeOf((*ast.CommentGroup)(nil)) )