Template for a good bug report, formatted with Markdown:
versions used (SonarQube - * Version 7.9.4 (build 35981), Scanner - (sonar-scanner-cli-4.5.0.2216-linux) , Build-wrapper - (build-wrapper-linux-x86))
error observed as in below logs for cpp project analysis while running Sonarscanner:
Caused by: com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: /path/to/file/file.cpp
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:76)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:73)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:33)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$5(CFamilySensor.java:503)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
@mpaladin It would not be possible for me to upgrade the SonarQube version as it is hosted and managed by team at organizational level. We have multiple project already integrated.
many issues have been faced since SonarCFamily plugin 6.8.0.16475, there has been 10 releases since then. Could you please share the entire sonar-scanner log?
I am sharing this logs in the attached file. I have removed project specific details (URL, PATH, etc) maintaining companies privacy policy.
Please let me know if this works for you.
Also when I add this few file (causing this error) to exclusion sonar-scanner execution is successful. But as we need to analyze all the source code we cannot remove this few files.
you may want to run the analysis with the property sonar.cfamily.reproducer=<SOME-PATH>/message_processor.cpp
where <SOME-PATH>/message_processor.cpp should be the exact path you find in the non-redacted log. It is going to create a file sonar-cfamily.reproducer which you should share with us. I can send you a pm where you can share it privately if it is ok with you.