Install Free
Eclipse | Team features | Advanced configuration

Advanced configuration

On this page

HTTP configuration

To operate, SonarLint needs to perform HTTP requests, especially in Connected Mode. While SonarLint will work out-of-the-box in most situations, some network infrastructure may require a custom configuration.

Manage your configuration

HTTP Client timeouts

SonarLint supports various timeouts. Below you will find the properties added to control them:

sonarlint.http.connectTimeout

  • Determines the timeout, in minutes, until a new connection is fully established. 
  • Default: 3 min

sonarlint.http.socketTimeout

  • Determines the default socket timeout value, in minutes, for I/O operations. 
  • Default: infinite

sonarlint.http.connectionRequestTimeout

  • The connection lease request timeout, in minutes, is used when requesting a connection from the connection manager. 
  • Default: 3 min

sonarlint.http.responseTimeout

  • Determines the timeout, in minutes, until the arrival of a response from the opposite endpoint. 
  • Default: infinite

Server SSL certificates

SonarLint manages its own truststore in addition to the OS and Java truststores. When encountering an untrusted certificate, SonarLint will ask the user if the certificate should be trusted. If the answer is yes, the certificate will be added to the truststore.

TrustStore

sonarlint.ssl.trustStorePath
  • Path to the keystore used by SonarLint to store custom trusted server certificates
  • default: ~/.sonarlint/ssl/truststore.p12
sonarlint.ssl.trustStorePassword
  • Password of the truststore.
  • default: sonarlint
sonarlint.ssl.trustStoreType

Client SSL certificates

Some servers or proxies may also require SonarLint to authenticate using client-side SSL certificates. This is a rare use case, and at for the moment, there is no UI to configure client-side SSL certificates. To properly authenticate client-side SSL certificates, you must manually create a keystore at the default location, or use the following properties:

KeyStore

sonarlint.ssl.keyStorePath
  • Path to the keystore used by SonarLint to store client certificates.
  • default: ~/.sonarlint/ssl/keystore.p12
sonarlint.ssl.keyStorePassword
  • Password of the keystore.
  • default: sonarlint
sonarlint.ssl.keyStoreType

Passing SonarLint properties

In SonarLint for Eclipse, you must edit the eclipse.ini and define extra VM arguments.

You'll need to edit the eclipse.ini file to add advanced HTTP properties.

Providing a Java runtime

SonarLint for Eclipse 10.0+ provides its own Java runtime if the IDE's JRE doesn't match the minimum requirement for Sonar’s analyzers: Java 17. This ensures that SonarLint can be compatible with Eclipse IDEs running on Java 11. However, it's possible to define a unique, self-managed Java runtime in the SonarLint Preferences window.

  • To define a self-managed runtime, go to Window > Preferences > SonarLint (Eclipse > Settings… > SonarLint for macOS), select the Java installation path, and then restart your IDE. After the restart, the SonarLint Console will display the specified Java runtime, matching the SonarLint Preference window.
SonarLint using the self-managed Java installation.
  • If you provide your own runtime, please check that your environment matches the version requirements. If the specified runtime is moved or cannot be found, SonarLint will see the field as blank.
  • If the field is blank, SonarLint will default to the Eclipse JRE as long as it meets the minimum requirement. This will be displayed in both the Preferences and the SonarLint Console.
  • If the Eclipse JRE does not meet the minimum requirement, SonarLint will use its own JRE. This will be displayed in both the Preferences and the SonarLint Console.

Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License