Error during execution of SonarLint analysis

Please provide

  • Operating system: Ubuntu 20.04
  • SonarLint plugin version: 5.9.0.31414 and 7.5.0.54140 (Tried both)
  • Programming language you’re coding in: C++
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 8.9.7

And a thorough description of the problem / question:
I have earlier generated reports at my end and on the fly locally. But after starting the VM after few days I am getting this issue mentioned below. I tried installing other version of Sonarlint as well but still the issue persist. Also how can I analyze “build-wrapper-dump.json” not sure abt the location of the file. The path mentioned in the logs for it is empty. Not sure how I can debug this issue. Kindly help.

Using build-wrapper-dump.json probe
Skip analysis of file: full-path/Source.cpp
PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
SE: 0 out of 0
Subprocess(es) done in 1ms
0 compilation units analyzed
Error during execution of SonarLint analysis
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * you are correctly invoking the scanner with correct configuration
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:451)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:80)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:71)
	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:132)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:126)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:111)
	at org.sonarsource.sonarlint.core.container.storage.StorageAnalyzer.analyze(StorageAnalyzer.java:75)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.analyze(StorageContainerHandler.java:83)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$analyze$0(ConnectedSonarLintEngineImpl.java:153)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:352)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:342)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:150)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.lambda$13(ConnectedEngineFacade.java:361)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.withEngine(ConnectedEngineFacade.java:154)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.runAnalysis(ConnectedEngineFacade.java:360)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.runAnalysis(AnalyzeConnectedProjectJob.java:70)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.runAnalysis(AnalyzeConnectedProjectJob.java:1)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:390)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:199)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:161)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hi,

Welcome to the community!

Could you share what you’re doing when you see this error? E.G. just coding along and it pops up? Or trying to trigger a SonarLint analysis? Or something else?

 
Ann