x/tools/go/analysis: change RelatedInformation
to work without fileset
#54233
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
RelatedInformation
is used to add information related to a diagnostic. Currently it is defined as:I believe this corresponds to LSP's
DiagnosticRelatedInformation
and thePos
/End
would be translated to LSPLocation
.The use of
token.Pos
inRelatedInformation
implies we need to depend on a certaintoken.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?cc @adonovan @timothy-king
The text was updated successfully, but these errors were encountered: