Skip to content

x/tools/gopls/internal/telemetry/cmd/stacks: incorrect line number in codesearch link #71660

Open
@adonovan

Description

@adonovan

In #71659 (comment), there is the following stack frame:

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)
		},

Metadata

Metadata

Assignees

Labels

ToolProposalIssues describing a requested change to a Go tool or command-line program.telemetryx/telemetry issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions