fix(parser): reflect.Ptr -> reflect.Pointer (v2.12.2 lint)#65
Merged
Conversation
reflect.Ptr is the deprecated pre-Go-1.18 alias; staticcheck (under golangci v2.12.2) flags it. Mechanical rename, no behavior change.
There was a problem hiding this comment.
Pull request overview
Updates the reflection-based parser to satisfy newer staticcheck linting by replacing deprecated reflect.Ptr usage with reflect.Pointer, with no intended runtime behavior change.
Changes:
- Replace
reflect.Ptrwithreflect.PointerinParseMachineStruct. - Replace
reflect.Ptrwithreflect.Pointerin state field parsing. - Replace
reflect.Ptrwithreflect.Pointerin marker-type detection.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
G115/G118/G204/G703/G704/G706 are high-noise rules that v2.12.2's bundled gosec newly enforces (none fired under v2.7.2). Taint (G703/G704/G706) moves to nox once nox/taint-analysis is verified; the rest are noisy. gosec keeps its stable high-signal rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-existing lint failure surfaced by the golangci v2.7.2→v2.12.2 bump (unrelated to any gosec work).
reflect.Ptris the deprecated pre-Go-1.18 alias forreflect.Pointer; staticcheck flags it. 3 mechanical renames in internal/parser/parser.go, no behavior change.