`~/home/.sonar/cache` folder with several MB of unused plugins

Hi everyone! :wave:

I recently realized that Sonar keeps some cache in the home folder ~/.sonar/cache.

After inspection, I noticed that it has multiple folders ranging a few kbs to ~50 mb, containing the sonar plugin jar for different languages (example: sonar-kotlin-plugin.jar), all adding up to over 300 mb.

It’s not much, but I was quite surprised to find dozens of languages that are not part of the stack of the Android project where I executed the sonar task: cpp, swift, go, python, cobol, vbnet to name just a few that are definitely quite surprising to be found there (and that are also among the heaviest ones).

When running ephemeral builds in the CI our agents need to download all of these files over and over again. This increases the chances for failures or download latencies that will impact the overall build.

I was wondering if this could be improved to limit the code to download only the specific language plugins that are necessary for the project instead of everything each time.

For reference, we are currently using version of the Gradle Plugin.

Attaching here a screenshot with the contents for context.



this is a well known problem, see this thread for all the details

The related jira tickets


1 Like

Thank you @Rebse, I couldn’t find anything it as I was searching about cache and didn’t see that thread. Definitively the same. I hope it gets prioritized :slight_smile: