- Versions used (SonarQube, Scanner, Plugin, and any relevant extension)
Sonar Scanner with the CFamily plugin:
- build-wrapper, version 6.12 (linux-x86)
- SonarScanner 4.4.0.2170
- Java 11.0.3 AdoptOpenJDK (64-bit)
- Linux 5.4.0-47-generic amd64
- CMake 3.16
- g++ 9.3, with std=c++17
- Error observed
ERROR:
An error occurred while analyzing the following compilation unit:
/***/***/microphone-service/src/microphoneservice.cpp
A file named "sonar-cfamily.reproducer" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
/***/***/microphone-service/sonar-cfamily.reproducer
The same error is repeated for a number of other files. sonar-scanner.txt (12.2 KB) .
-
Steps to reproduce
Please let me know the best way to providesonar-cfamily.reproducer
privately -
Potential workaround
- Add the files to the exclusion lists. This lets the scanner work on some files, but then not all files are getting scanned, so this is not ideal
-
Scanner command used when applicable (private details masked):
Build wrapper run with: (build-sonar
is clean CMake build directory)
build-wrapper-linux-x86-64 --out-dir $BW_OUTPUT make -j $(nproc) -C build-sonar clean all
Sonar scanner run with sonar-scanner
using the following project properties:
sonar.projectKey=****
sonar.projectName=****
sonar.organization=****
sonar.sources=src
sonar.host.url=https://sonarcloud.io
sonar.cfamily.build-wrapper-output=sonar/bw-output
sonar.cfamily.junit.reportsPath=test-reports
sonar.sourceEncoding=UTF-8
sonar.cfamily.threads=8
- In case of SonarCloud:
- Bitbucket Cloud + Bitbucket Pipelines, but the error also exists when running the scanner manually