Show all locations not showing up [VSCode, WSL]

Hey,

I am using the SonarLint extension for VSCode on Windows, my code is in WSL (not sure this is relevant). The extension is connected to a private instance of SonarQube Community Edition (again, not sure this is relevant). And sonarLint is working well when a specific file is open.

It says to use “Show all location” code action from a SonarLint issue but this item is never present. Am I doing something wrong?

Additionally, I am working on a large codebase with a lot of Sonar issues that I need to fix. I remember there being a scan all (or something like that) in the command panel that would show you a clickable list of all issues in the Problems window. Has this been removed, did I imagine it? Is there a way to scan the whole codepage and list all items (maybe a CLI if not in the extension)?

Many thanks,

Andy

Hello, thanks for your questions!

I will start with the second one first: in VSCode, the “scan whole project / directory” feature is not implemented (you might remember it from Eclipse or IntelliJ).

However, all issues detected by SonarLint in open files will appear in VSCode’s “Problems” view, which you can toggle with command “View: Toggle Problems” (Ctrl+Shift+M).

(In case you would like to make problems more visible in the editor pane, I highly suggest that you have a look at the excellent Error Lens extension).

The “SonarLint Issue Locations” view is specific to issues that have multiple locations, signaled by [+x locations] or [+y flows] in the problem’s title; e.g a possible NullPointerException that has a tricky data flow:

This will open the locations view and enrich the editor with inline hints: