Dear all,
Thank you for providing a C family plugin in vscode with Sonarlint.
- Operating system: Windows
- IDE name : VSCode 1.66
- SonarLint plugin version: V3.4.1
- Is connected mode used: No only on the flow
I am trying to use SonarLint in VSCode or a project that use MSVC and CMake. To have a compile_commands.json, I create a “false” file by only setting the parameters file, directory and command (with the value whatever for the latter).
SonarLint verbose log and Analyzer show that file is parsed but it always finds 0 issues.
Is it mandatory to have a compiler set-up in compile_commands.json ?
I was thinking that only file and directory are used to compare file.
Thank you.
[Info - 03:25:40.288] Index files
[Debug - 03:25:40.290] Language of file 'file:' is set to 'C++'
[Info - 03:25:40.299] 1 file indexed
[Debug - 03:25:40.308] 'JavaSensor' skipped because there is no related files in the current project
[Debug - 03:25:40.309] 'Python Sensor' skipped because there is no related files in the current project
[Debug - 03:25:40.309] Execute Sensor: CFamily
[Info - 03:25:40.315] Parsing compilation database
[Debug - 03:25:40.317] Time to parse Compilation Database: 2ms
[Info - 03:25:40.318] main.cpp using compilation database entry with same name and different directory: test_lint/main.cpp
[Info - 03:25:40.319] Subprocess(es) done in 9ms
[Info - 03:25:40.319] 0 compilation units analyzed
[Debug - 03:25:40.320] Execute Sensor: Sonar Secrets Detection Sensor
[Debug - 03:25:40.321] 'PHP sensor' skipped because there is no related files in the current project
[Debug - 03:25:40.321] 'Analyzer for "php.ini" files' skipped because there is no related files in the current project
[Debug - 03:25:40.322] 'XML Sensor' skipped because there is no related files in the current project
[Debug - 03:25:40.322] Execute Sensor: HTML
[Info - 03:25:40.342] Found 0 issues