Analyzers mainly use secondary locations for 2 reasons:
to navigate to (potentially remote) parts of the code that explain the issue
to highlight several parts of the code (generally close to the primary location)
In the first case, all locations should have an explanatory message.
In the second case, no location should have a message, which results in a list of locations that looks odd. In this case, the IDE should only allow to highlight all locations, and not show the full list of locations.
Example of a how a "non-navigation" flow currently appears
TODO:
currently selecting an issue with secondary locations opens the issue visualization tool window. Should this still happen in the "non-navigation" case? Presumably not?
Notes
Currently the only way to determine whether secondary locations are for "navigation" or "highlighting" is to check the whether all of the secondary location message are empty. If so, we should assume that they are for "highlighting" only.
Analyzers mainly use secondary locations for 2 reasons:
In the first case, all locations should have an explanatory message.
In the second case, no location should have a message, which results in a list of locations that looks odd. In this case, the IDE should only allow to highlight all locations, and not show the full list of locations.
Example of a how a "non-navigation" flow currently appears
TODO:
Notes
Currently the only way to determine whether secondary locations are for "navigation" or "highlighting" is to check the whether all of the secondary location message are empty. If so, we should assume that they are for "highlighting" only.
Related tickets for other flavours
SLE: https://jira.sonarsource.com/browse/SLE-388 SLI: https://jira.sonarsource.com/browse/SLI-455 VS Code: https://jira.sonarsource.com/browse/SLVSCODE-154