SonarLint on VSCode does not hide 'Won't Fix' or 'False Positive' issues

(Rawl) #1

Setup: My workstation is running SonarQube v7.2 (CE) + VSCode v1.29.1 + SonarLint v1.5.0. I configured
connected mode in user settings and bind the project in workspace settings.

issue: SonarLInt seems to be working fine and updates the local cache when making changes to a quality profile in the SonarQube server but it will not hide issues that are marked as Won’t Fix or False Positive in the server (these are properly hidden in the server)

Is there additional setup that needs to be done? Thank you!

(Julien Henry) #2


Is the root of the project in VSCode the same as the one in SQ? Currently the issue matching is a bit limited in VScode, and it requires the files relative paths to match perfectly.


(Rawl) #3

Hi Julien,

Thank you for answering. In VSCode, I opened the same file that is being scanned by the SonarQube server (both tools are installed on the same machine for evaluation purposes) so, if I understood your question correctly, the answer is yes…

(Janos Gyerik) #4

No, Julien meant the relative path of the file in your VSCode workspace and in the SonarQube project.

For example, if the relative path in the SonarQube project is module1/dir1/file1.js, and in VSCode you have the workspace open at the module1 level, so that the relative path in VSCode will be dir1/file1.js (without the module1 prefix), then the relative paths don’t match between your workspace and on SonarQube, and issue tracking will not work.

Do the relative paths match in your case?

(Rawl) #5

Hi Janos,

I think so but I may be missing something… So, here are the paths:

  • SonarQube server: I select the project and navigate to the ‘Code’ tab, then I select the file and SonarQube indicates: path = srcPy/install/web/ (issues = 3)

  • VSCode: I’ve created a workspace for this project. Then, I select the applicable file ( and right click to open the context menu and select ‘Copy Relative Path’: path = srcPy/install/web/ (issues = 5, i.e. including two issues that were marked as won’t fix or false positive in the server)

Sorry, I should say that I have started utilizing these tools recently and I am not very familiar with them. Any help would be greatly appreciated!