Skip to content

Commit ec02134

Browse files
committed
chore(lint): exclude modernize newexpr rule for Ptr calls
The modernize/newexpr rule incorrectly suggests replacing github.Ptr(x) with new(x), but new() takes a type not an expression — the auto-fix generates invalid Go code. Exclude this specific rule pattern.
1 parent d7d6a15 commit ec02134

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ linters:
4444
linters:
4545
- unparam
4646
text: always receives
47+
- linters:
48+
- modernize
49+
text: "newexpr: call of Ptr"
4750
- linters:
4851
- staticcheck
4952
text: "SA1019.*ByID.*deprecated"

0 commit comments

Comments
 (0)