Eclipse Plugin - Configure SONARLINT_USER_HOME

95 views
Skip to first unread message

Paul Borgen

unread,
May 10, 2018, 9:38:39 AM5/10/18
to SonarLint
I am trying to change the location of the SONARLINT_USER_HOME directory that the eclipse plugin uses. Is there a way to do this?

I added the environment variable "SONARLINT_USER_HOME" - This is not work at all.
I added a "Analyzer Properties" in eclipse of "SONARLINT_USER_HOME". - This tried to work. The plugins at least went to the directory I specified.  But was still using the default eclipse directory

janos....@sonarsource.com

unread,
May 14, 2018, 4:31:19 AM5/14/18
to SonarLint
Hi,

If you set the SONARLINT_USER_HOME environment variable before starting Eclipse, it will override the default value (= ~/.sonarlint) used by Eclipse. This will certainly work. But I'm not sure that will help you achieve what you want. SonarLint for Eclipse uses SONARLINT_USER_HOME mainly for a global cache of downloaded and unzipped plugins. For example, if you set this variable to /tmp/sonarlint and start Eclipse, then you should see /tmp/sonarlint/plugins directory get created, with all embedded and downloaded plugins extracted there.

Can you tell us more about your goal? What is your expectation by using a custom value for SONARLINT_USER_HOME?

Cheers,
Janos

Paul Borgen

unread,
May 14, 2018, 11:25:21 AM5/14/18
to SonarLint
My main goal is to control where files get created on disk. I wish we could easily override the default for this.

janos....@sonarsource.com

unread,
May 15, 2018, 2:49:33 AM5/15/18
to SonarLint
Hi,

The other part of the disk storage used by SonarLint for Eclipse goes in the .sonarlint directory of the workspace. It's not possible to control this path directly, but it's possible to do indirectly, by choosing where you put your workspace.

To sum it up, you can control where SonarLint for Eclipse creates file by your choice of workspace location and by overriding SONARLINT_USER_HOME.

Cheers,
Janos
Reply all
Reply to author
Forward
0 new messages