Open
Description
RelatedInformation
is used to add information related to a diagnostic. Currently it is defined as:
type RelatedInformation struct {
Pos token.Pos
End token.Pos
Message string
}
I believe this corresponds to LSP's DiagnosticRelatedInformation
and the Pos
/End
would be translated to LSP Location
.
The use of token.Pos
in RelatedInformation
implies we need to depend on a certain token.FileSet
. If the positions of the related information belong to the same package, that's fine. Otherwise, it is awkward to use. For example, I hoped I could annotate reports on functions that transitively call known vulnerable symbols. But the vulnerable symbols may be in different package and we learned about it from Facts generated by the analyzer run on the package.
Will Position
be too inefficient?