Cannot get the same issues in Sonar server when using SonarLint connected mode in VSCode

Hi,

I’m using

  • VSCode version 1.24.1
  • SonarLint 1.4.0
    and Connected Mode

On Server,

  • Server 7.2
  • SonarJS: 4.1
  • SonarTS: 1.7b 2893

The problem I have after fresh installation is that, there are some errors shown in the SonarServer but not in the VSCode. However, I got some warnings (I’m using TypeScript) but not all of them are shown.

Here is the info I got from SonarLint when opening a ts file

[Info  - 15:40:42] 1 files indexed
'PHP sensor' skipped because there is no related file in current project
'Analyzer for "php.ini" files' skipped because there is no related file in current project
'Python Squid Sensor' skipped because there is no related file in current project
'Import of TSLint issues' skipped because one of the required properties is missing
'Import of ESLint issues' skipped because one of the required properties is missing
Execute Sensor: Contextual SonarTS
[Info  - 15:40:42] Started SonarTS Analysis
[Info  - 15:40:42] Finished SonarTS Analysis
'SonarJS' skipped because there is no related file in current project

Thanks,

Hi Phong,

Could you share the logs that are a bit earlier? Something like:

Analysis triggered on file:///home/julien/Prog/Projects/scanners/sonar-scanner-vsts/common/ts/prepare-task.ts with configuration: 
[
  baseDir: /home/julien/Prog/Projects/scanners/sonar-scanner-vsts
  workDir: /home/julien/Prog/Projects/scanners/sonar-scanner-vsts/.sonarlint
  extraProperties: {}
  excludedRules: []
  includedRules: []
  inputFiles: [
    /home/julien/Prog/Projects/scanners/sonar-scanner-vsts/common/ts/prepare-task.ts (UTF-8) [ts]
  ]
]

I’m interested to know if your file is not considered as a test file by SonarLint, which explain why only a few issues are reported.

Thanks for your reply, here you are

Analysis triggered on file:///d%3A/workspace/src/app/errors.ts with configuration: 
[
  baseDir: d:\workspace\
  workDir: d:\workspace\.sonarlint
  extraProperties: {}
  excludedRules: []
  includedRules: []
  inputFiles: [
    d:\workspace\src\app\errors.ts (UTF-8) [ts]
  ]
]

Available languages:
  * PHP => "php"
  * Python => "py"
  * TypeScript => "ts"
  * JavaScript => "js"

Everything looks good. Can you give example of issues you see in SonarQube but not in SonarLint, including code snippet and rule id?