SonarLint for Visual Studio Code - Connected doesn't fully work ?

1,185 views
Skip to first unread message

alex.b...@gmail.com

unread,
Feb 5, 2018, 4:58:47 AM2/5/18
to SonarLint
Hello, 

I'm trying to setup SonarLint with SonarQube for Visual Studio Code.

I've my SonarQube server already setup, and I've been trying to change from TSLint to SonarLint for Visual Studio Code.
Following the steps I have succesfully installed everything.

- I can now directly use the SonarQube Scanner and push the code issues directly to my SonarQube.


- I can use the sonarlint CLI and with the 3 files (global.json, sonar-project.properties, sonarlint.json), it tells me that I'm in connected mode and therefore I assume it should get the code issues from the SonarQube server but it doesn't.

Am I missing something to make SonarLint fully functionnal on Visual Studio Code ? My only aim is to get the errors like TSLint.
 
------------------------------------

Here are my different files with their configuration :  (I've hid the url and sonar server ID)


global.json

{
"servers": [
{
"id": "localhost",
"token": "YOUR_SONARQUBE_AUTH_TOKEN"
},
{
"id": "XXXXXXXXXXXX",
"login": "sonar",
"password": "sonar"
}
]
}


sonar-project.properties

# must be unique in a given SonarQube instance
sonar.projectKey=siga:siga-web
#sonar.projectKey=siga:siga-web
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=siga
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=src
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8


sonarlint.json

{
"serverId": "XXXXXXXXXXXXXX",
"projectKey": "siga:siga-web"
}


when running sonarlint-cli with interactive mode :

$ sonarlint -i
INFO: Java 1.8.0_141 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: Connected mode (siga:siga-web)
INFO: Using storage for server 'XXXXXXXXXXX' (last update 02/02/18 18:49)
INFO: Index files
INFO: 292 files indexed
INFO: 1 source files to be analyzed
INFO: 1/1 source files have been analyzed
INFO:

-------------  SonarLint Report  -------------

  No issues to display (292 files analyzed)

-------------------------------------------

Thanks in advance,

Regards,

Alex Beugnet
Reply all
Reply to author
Forward
0 new messages