.sonarlint temporary folder directory filling space, not getting cleared

  • Operating system: Windows 10 version 22H2
  • SonarLint plugin version: 4.10.0
  • Programming language you’re coding in: Mostly but not exclusively TypeScript
  • Is connected mode used: It might have been more than a year in the past, but I don’t think this one was, if it was it would’ve been removed, and I don’t see any of the settings associated with Connected Mode in settings.json.

This appears to be a reboot of SonarLint extension for VSCode is creating way too many tmp folders which was reported as an issue in March 2021 and fixed in August 2023 in v3.21.0 by fixing code that was supposed to clean up temporary folders.

Here is a partial listing of my .sonarlint user folder:

There are several more of these that can’t fit even on that long screenshot, with dates going back to Oct/18/23 (all postdating the supposed fix), and then a “telemetry” folder listed as modified Sept/3/22. It’s about a GB of data that doesn’t seem to be actively helping anything and as far as I can tell is just taking up space on the hard disk. It seems like the issue or another related one probably still exists.

I’d also very much like to customize the location of that folder as a setting, to put it on a different drive.

Hello ! I juste wanted to confirm that i’m getting the same behavior on MacOS + VSCode as well. As can be seen in the picture, I have almost 300GB of files there :sweat_smile:

Not a big deal though, now I know what to look for when i’m out of space !

I’m in the same situation (over 270GB on my mac). Can I erase this folder without repercussions? Any fix so it doesn’t happen again?

Thanks,

Hey folks!

Thanks a lot for reporting this behavior. Could you please share some additional details on your setup - what languages are you mostly coding in? Are you using Connected Mode? Do you use SonarQube for IDE (formerly SonarLint) in other IDEs as well?

Based on the current logic:

  • On each startup, we clean up folders starting like .sonarlinttmp_* that are older than 7 days (they can be removed manually as well)
  • On each startup, folders starting with xodus-* that are older than 3 days are cleaned up

If you see these any such folders older than 7 days, and you are on the latest version of the extension, please let us know.

In addition, we are actively working on reducing the usage of .sonarlinttmp_* folders. The improvements should be already coming in the next version of the extension.

Thanks in advance for additional details,
All the best,
Sophio

Hello Sophio. Thank you for your quick response.

I’ve closed and reopened VSCode and it solved the issue. That said, and in response to your questions:

  1. I’m coding in Python, mostly using notebooks;
  2. I don’t think I’m using connected mode, but I don’t know;
  3. Only in VSCode.

Thank you again and take care,

1 Like

Hi folks!

In v4.14 of the extension, we’ve released a change to prevent the creation of too many temp folders. The change mostly affects users who analyze JS/TS/CSS code. Please upgrade, and restart your VS Code window. You can either manually delete the old .sonarlinttmp_* folders, or just wait and observe for a couple of days to see if the folder size goes down.

Thanks a lot again for bringing this to our attention!! :gift:

All the best,
Sophio