Connected Mode
Pages 8
Clone this wiki locally
Overview
You can connect SonarLint to SonarQube >= 7.9 or SonarCloud to aim at having consistent issues reported on both sides.
Features when connected mode is used:
- use the same analyzers than the server, assuming they are supported in SonarLint (except for JS/TS and HTML analyzers where SonarLint keep using its embedded version)
- use the same quality profile (same rules activation, parameters, severity, ...)
- reuse some settings defined on the server (rule exclusions, analyzer parameters, ...)
- automatically suppress issues that are marked as Won’t Fix or False Positive on the server
Note: connected mode does not push issues to the server. Rather, its purpose is to configure the IDE so that it uses the same settings as the server.
Configure a connection
A connection is the set of informations needed to communicate with the SonarQube server or SonarCloud (URL, credentials, ...).
Configure a connection to a SonarQube server
-
Open the connection wizard, for example using menu File -> New-> Other... and then SonarQube/SonarCloud Connection:
-
Select SonarQube and click on the Next button:
- Enter your SonarQube server URL:
- Choose the authentication method:
- Token: generate a user token on SonarQube, to be used by SonarLint as authentication method. This is the preferred way to avoid the risk to compromise your username/password.
- Username + Password: use directly your SonarQube credentials (not recommended)
-
Enter your token or username/password
-
Give your connection a name
Configure a connection to SonarCloud
- Generate a token on SonarCloud, to be used by SonarLint as authentication method.
View configured connections
Configured connections can be retrieved from the Bindings view (Window > Show View > Other... > SonarLint > SonarLint Bindings).
This should open a view at the bottom, listing all connections:
A right-click on a connection will open a contextual menu to remove or edit the connection. It can be useful for example to update the credentials if they have changed.
Configure project(s) binding
Troubleshooting
Why I have some issues reported on SonarQube/SonarCloud but not in SonarLint?
TODO: copy from the FAQ