x/tools/internal/analysisinternal: document need for alternative SuggestedFixes to have distinct Messages #72105
Labels
BugReport
Issues describing a possible bug in the Go implementation.
Documentation
Issues describing a change to documentation.
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Go version
go version go1.22.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Invoked analysisutil.ValidateFixes with multiple non-overlapping SuggestedFix entries sharing identical messages but distinct code positions, triggering a false validation error.
Validation Logic: ValidateFixes
Trigger Condition:
Observed Error:
analyzer "demo" suggests two fixes with same Message ("Fix example")
What did you see happen?
Actual Output:
analyzer "demo" suggests two fixes with same Message (“Fix example”)
Key Observations:
What did you expect to see?
Expected Behavior:
Validation should accept multiple fixes with identical messages when:
Technical Justification:
The text was updated successfully, but these errors were encountered: