Description
I use Visual Studio Code together with the IAR Embedded Compilers. After setting SonarLint up in in Connected Mode according to instructions in Marketplace, I get the error Error executing sensor: ‘CFamily’ in SonarLint output.
Versions
I use the following tools/versions:
-
SonarQube: Enterprise Edition Version 8.9.7 (build 52159)
-
SonarLint: 3.4.0
-
Visual Studio Code: 1.66.0
-
IAR C/C++ Compiler for ARM: 9.20.4.327
-
Java: OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
SonarLint Output
[Debug - 11:36:52.678] Start analysis
[Info - 11:36:52.686] Index files
[Debug - 11:36:52.687] Language of file 'file:///c:/Projekte/limulus/src/itc/ITCFramework.cpp' is set to 'C++'
[Info - 11:36:52.690] 1 file indexed
[Debug - 11:36:52.695] Loading C:\Users\102-anmu\AppData\Local\Temp\sonarsource-cfamily-jni13307686884390603175.dll
[Debug - 11:36:52.861] 'JavaSquidSensor' skipped because there is no related files in the current project
[Debug - 11:36:52.861] Execute Sensor: CFamily
[Debug - 11:36:52.863] Unpacking analyzer to: C:\Users\102-anmu\.sonarlint\work\.sonartmp_16605804904575216633\2115453303497960910
[Info - 11:36:54.571] Parsing compilation database c:\Projekte\limulus\compile_commands.json
[Error - 11:36:54.609] Error executing sensor: 'CFamily'
[Error - 11:36:54.610] java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Unknown Source)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
at java.base/java.nio.file.Path.of(Unknown Source)
at java.base/java.nio.file.Paths.get(Unknown Source)
at com.sonar.cpp.analyzer.DriverUtil.absolute(DriverUtil.java:30)
at com.sonar.cpp.plugin.CompileCommandsReader.getCapture(CompileCommandsReader.java:95)
at com.sonar.cpp.plugin.CompileCommandsReader.readCaptures(CompileCommandsReader.java:45)
at com.sonar.cpp.plugin.SonarLintSensor.fillCapturesMaps(SonarLintSensor.java:260)
at com.sonar.cpp.plugin.SonarLintSensor.parseCompileCommands(SonarLintSensor.java:229)
at com.sonar.cpp.plugin.SonarLintSensor.processCompileCommands(SonarLintSensor.java:139)
at com.sonar.cpp.plugin.SonarLintSensor.process(SonarLintSensor.java:131)
at com.sonar.cpp.plugin.SonarLintSensor.execute(SonarLintSensor.java:94)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:169)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:81)
at org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor.execute(SensorsExecutor.java:72)
at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer.startComponents(ComponentContainer.java:119)
at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer.execute(ComponentContainer.java:104)
at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:152)
at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:70)
at java.base/java.lang.Thread.run(Unknown Source)
[Debug - 11:36:54.610] 'Apex Sensor' skipped because there is no related files in the current project