File was found but 0 C/C++/Objective-C files were analyzed

Request help!
When I use sonar to scan items, ‘The “build wrapper dump. json” file was found but 0 C/C++/Objective-C files were analyzed.’ I tried to delete the ‘-E’ parameter(https://community.sonarsource.com/t/scanner-scan-code-failed/70719/6), but still couldn’t solve the problem. Here are some of my scan logs and scanned shell codes, build-wrapper-dump.json and build-wrapper The log file is a G in total, which is too large. If necessary, can you send me an email.

I look forward to your reply. Thank you!

shell.txt (1.5 KB)
sonar-scan.log (101.7 KB)

Hello @dr.missname,

From the logs you have shared, I can’t say for sure that your build is clean: the build command is not make clean and I don’t know what make ls101_defconfig does (even though I can guess from the name).
Could you confirm that you are doing a clean build?

If so, I do not see anything weird in your logs so I would need the build-wrapper.log as well as the build-wrapper-dump.json.
Because they are too big to be uploaded in Community, could you please upload them on a cloud storage service (like WeTransfer)?

Thank you,
Amélie

This is the build-wrapper.log and build-wrapper-dump.json(WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free), make ls101_ Defconfig is only used to select a chip. It will not build anything. The real build is make - j4

Hello @dr.missname,

Thank you for the files.

The problem is that the build and the analysis are done in two different paths.
In the build-wrapper.json the path of the compiled files is:
/home/zhaobingfeng/LS101/output/build/doorbell-1.0.0/product_test/
But in the scanner logs the indexed files are in:
product/doorbell/src/product_test/

Absolute paths must be identical in build and analysis steps for the analysis to work.

Thank you very much for your professional answer and help me solve this problem. My problem has been solved!

1 Like

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