Skip to content

Commit 194371c

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 9c30f28 commit 194371c

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
@@ -47,6 +47,9 @@ linters:
4747
- linters:
4848
- staticcheck
4949
text: "SA1019.*ByID.*deprecated"
50+
- linters:
51+
- modernize
52+
text: "newexpr: call of Ptr"
5053

5154
issues:
5255
max-issues-per-linter: 0

0 commit comments

Comments
 (0)