You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/lsp/cache: fix nil panic in analysis toSourceDiagnostic
The set of enabled analyzers is expanded to include requirements,
but we should not use the expanded set in the final loop when
we map back to source.Analyzers. Nonetheless, it is surprising
that any analyzer only in the expandes set should report a
diagnostics, so I've added an assertion.
Fixesgolang/go#60909
Change-Id: I3b6e21194f7d717628822b933e6f4a387f719a1c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/504818
Run-TryBot: Alan Donovan <[email protected]>
gopls-CI: kokoro <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
bug.Reportf("Internal error: got %d unexpected diagnostics from analyzer %s. This analyzer was added only to fulfil the requirements of the requested set of analyzers, and it is not expected that such analyzers report diagnostics. Please report this in issue #60909.", n, a)
355
+
}
356
+
}
357
+
continue
358
+
}
359
+
341
360
// Inv: root.summary is the successful result of run (via runCached).
0 commit comments