Need your help.
Basically, after I upgrade VSCode to the below version, sonarlint extension (latest version 1.9.0) it stopped working. Meaning, it is not showing any warning or error in the editor for TypeScript which used to highlight before.
Also, note that I didn’t change any settings.json parameters from the previous version which includes
sonarlint.connectedMode.project parameters. Could you please help me with this.
Version: 1.37.1 (system setup)
OS: Windows_NT x64 10.0.18362
Have you updated the binding after the update? The format of the local storage has changed and needs to be downloaded again from the server.
If that doesn’t fix your issue, could you please provide:
- the version of the SonarQube server your are binding to (or tell us if this is SonarCloud)
- the version of the SonarTS plugin installed on the server (you can easily get this information by opening
https://<your SQ server>/api/plugins/installed
Also it would be interesting to look at the SonarLint output, and report any suspicious message (or even the complete output if possible, so that we can see possible issues). On my side I have this when opening a .ts file:
Analysis triggered on file:///home/julien/Prog/Projects/sonarlint/sonarlint-vscode/src/extension.ts with configuration:
file:///home/julien/Prog/Projects/sonarlint/sonarlint-vscode/src/extension.ts (UTF-8) [ts]
* TypeScript => "ts"
Declared extensions of language TypeScript were converted to ts: **/*.ts,**/*.tsx
[Info - 08:37:13] Index files
Language of file 'file:///home/julien/Prog/Projects/sonarlint/sonarlint-vscode/src/extension.ts' is set to 'ts'
[Info - 08:37:13] 1 file indexed
* ts: 'SonarSource TypeScript Conventions' (116 rules)
Setting filesystem encoding: UTF-8
Execute Sensor: Contextual SonarTS
[Info - 08:37:15] Started SonarTS Analysis
Initializing metadata of file file:///home/julien/Prog/Projects/sonarlint/sonarlint-vscode/src/extension.ts
[Info - 08:37:16] Finished SonarTS Analysis
fetchServerIssues projectKey=org.sonarsource.sonarlint.vscode:sonarlint-vscode, fileKey=src/extension.ts
GET 200 https://next.sonarqube.com/sonarqube/batch/issues?key=org.sonarsource.sonarlint.vscode%3Asonarlint-vscode%3Asrc%2Fextension.ts | response time=634ms
Downloaded issues in 753ms
Thanks, @Julien_HENRY for this response.
I have followed your advice as follows
- Updated SonarLint bindings successfully
- Versions as below
Version 6.7.5 (build 38563)
version: 1.1 (build 1079)
But I need your guidance where to get SonarLint output in Windows + VSCode
Look at Frequently asked questions (search for “How to get SonarLint for VSCode logs?”)
Here is the SonarLint output from VSCode for your advise.
Analysis triggered on 'file:///d%3A/sol/src/app/app.component.ts with configuration':
'file:///d%3A/sol/src/app/app.component.ts (UTF-8) [ts]'
No language available
[Warn - 1:33:15 PM] No analyzers installed
[Info - 1:33:15 PM] Index files
Language of file 'file:///d%3A/sol/src/app/app.component.ts' is set to 'ts'
[Info - 1:33:15 PM] 1 file indexed
The issue is that SonarTS plugin is too old to run in SonarLint. You have to update to 22.214.171.1242 or more recent.