Unable to show C++ findings using SonarLint plugin

Please provide

  • Operating system: Windows 10
  • SonarLint plugin version: v4.2.2
  • Programming language you’re coding in: C++
  • Is connected mode used: Yes
    • Connected to SonarQube v9.9.3

And a thorough description of the problem / question:
When I try to transfer the analysis results from our SonarQube server something starts in the background but when CFamily is tried i get the following error:

 [Info  - 14:06:58.357] Parsing compilation database C:\Users\Kristian.Kroeier\Downloads\artifacts (3)\.sq\build-wrapper-dump.json
[Error - 14:06:58.357] Error executing sensor: 'CFamily'
[Error - 14:06:58.357] java.lang.IllegalStateException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $
	at com.sonar.cpp.plugin.CompileCommandsReader.readCaptures(CompileCommandsReader.java:65)
	at com.sonar.cpp.plugin.SonarLintSensor.fillCapturesMaps(SonarLintSensor.java:275)

I can see others with the same errors have been suggested to look into their json file and look for directory, command and file. I see none of those in my file despite it being created by the build-wrapper v. 6.41.1.

Hey there.

You can’t use the output of the build wrapper as a compilation database. You can see our recommendations for how to generate a compilation database that can be used by SonarLitn for VSCode in the SonarLint for VSCode docs

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.