SonarSource / sonarlint-visualstudio

SonarLint extension for VisualStudio
https://redirect.sonarsource.com/doc/sonar-visualstudio.html
GNU Lesser General Public License v3.0
466 stars 77 forks source link

Distinguish "navigation"-style from "highlighting"-style secondary locations #1759

Open jblievremont opened 4 years ago

jblievremont commented 4 years ago

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

image

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

jblievremont commented 4 years ago

See original discussion.