Open
Description
In #71659 (comment), there is the following stack frame:
- golang.org/x/tools/gopls/internal/cache.(*action).exec.func3:+3
(golang.org/x/tools/gopls@v0.18.0-pre.1 go1.23.5 windows/amd64)
The symbol name refers to line 3 of the Report closure, i.e. the "invalid SuggestedFixes" bug report, but the link target is in the middle of a comment.
Report: func(d analysis.Diagnostic) {
// Assert that SuggestedFixes are well formed.
if err := analysisinternal.ValidateFixes(apkg.pkg.FileSet(), analyzer, d.SuggestedFixes); err != nil {
bug.Reportf("invalid SuggestedFixes: %v", err) <---- correct location
d.SuggestedFixes = nil
}
diagnostic, err := toGobDiagnostic(posToLocation, analyzer, d)
if err != nil {
// Don't bug.Report here: these errors all originate in
// posToLocation, and we can more accurately discriminate
// severe errors from benign ones in that function. <------ actual link target
event.Error(ctx, fmt.Sprintf("internal error converting diagnostic from analyzer %q", analyzer.Name), err)
return
}
diagnostics = append(diagnostics, diagnostic)
},