SonarLint plugin saves findings into the home directory instead of a project directory

Please provide

  • Operating system: Ubuntu 22.04.4 LTS
  • SonarLint plugin version: 10.8.0.79133
  • IntelliJ version: IntelliJ IDEA 2024.1.5 (Ultimate Edition)
  • Programming language you’re coding in: Java, js, VueJS Python
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:
The report tab of the SonarLint extension always shows reports of all projects mixed together. When trying to figure out why I started with the log tab, and it only analyzes the files for the current project, but there is a warning that no workDir is set for SonarLint.

Further searching around showed me that older projects actually have a .idea/sonarlint folder where the findings are stored, this seems to be not done anymore for me, all my findings are mixed together in ~/.sonarlint, which I am 99% sure is the offender for my reports being mixed.

I uninstalled the SonarLint plugin and manually cleaned out any configs left over in the IntelliJ config folder, then installed it again, no change.

When looking into how to set the workDir for SonarLint for IntelliJ I only found the information that only the config option the plugin provides can be used, and I did not see anything in there to help me.

Does anyone have any idea how I can fix this? It is getting annoying that every commit in the frontend project I get told I can’t commit because the checks for the backend failed because of open TODOs…

Hello @Nadine_Seibel, thank you for your findings!

We investigated the case and effectively found an issue on our side. We are actively working on fixing this issue and will provide you with more information about a potential new release to fix it in the coming days.

In the meantime, as a workaround, you can close and reopen your IDE, open the project you want to analyze completely, and trigger the full analysis. Whenever you open a second project, the issues may get mixed together. Sorry for the inconvenience.

Hey @Nadine_Seibel, we have just released SonarLint 10.8.1 which should fix this issue. Could you please update and see if you can reproduce the problem? Thank you!

Hello,
sorry for the late answer, I encountered this issue at work and shortly before taking a vacation. Now that I am back in office I can report that it works flawlessly, no more java issues in my frontend code

3 Likes

I am glad to hear your issue is resolved! If you enjoy SonarLint, do not hesitate to give a review on our marketplace.

Thank you for using SonarLint! :sonarlint: