Vscode is remotely connected to Linux in windows, and the sonarlint plug-in does not work

Please provide

  • Operating system: windows10 remote linux
  • IDE name and flavor/env: vscode
  • SonarLint plugin version: 3.4.1
  • Is connected mode used: no
    • Connected to SonarCloud or SonarQube (and which version): no

And a thorough description of the problem / question:
I use vscode to connect to Linux remotely. The Sonarlint plugin was also installed on Linux systems, compile_commands.json I also used comparedb make to generate automatically, settings.json was also configured with “sonarlint.pathToCompileCommands”, but when analyzing the C code, the plugin did not take effect. While creating a java file in the project, sonarlint analyzes the java code to be valid.

Hello, thanks for reporting this.

Could you please follow the steps described in the FAQ to enable analysis logs and share the output of analyzing the C code in this thread? This could be useful in understanding what goes wrong.

[Info - 09:20:47.693] Analyzing file ‘file:///home/hsm/.vscode/settings.json’…
[Warn - 09:20:48.506] Plugin ‘secrets’ embeds dependencies. This will be deprecated soon. Plugin should be updated.
[Info - 09:20:52.084] Index files
[Info - 09:20:52.093] 1 file indexed
[Info - 09:20:52.461] Found 0 issues
[Info - 09:20:52.518] Analyzing file ‘file:///home/hsm/.vscode/c_cpp_properties.json’…
[Info - 09:20:52.530] Index files
[Info - 09:20:52.530] 1 file indexed
[Info - 09:20:52.554] Found 0 issues
[Info - 09:21:10.214] Analyzing file ‘file:///home/hsm/src/compile_commands.json’…
[Info - 09:21:10.224] Index files
[Info - 09:21:10.225] 1 file indexed
[Info - 09:21:10.248] Found 0 issues
[Info - 09:21:15.083] Analyzing file ‘file:///home/hsm/src/hello.c’…
[Info - 09:21:15.094] Index files
[Info - 09:21:15.094] 1 file indexed
[Info - 09:21:19.070] Parsing compilation database /home/hsm/.vscode/compile_commands.json
[Info - 09:21:19.175] Skip analysis of file: /home/hsm/src/hello.c
[Info - 09:21:19.176] Subprocess(es) done in 151ms
[Info - 09:21:19.176] 0 compilation units analyzed
[Info - 09:21:19.193] Found 0 issues