I am testing out sonarcloud through github action. I introduced some errors in my implementation and expected sonarcloud to find those bugs (like dereferencing null pointers, unused return values etc). But sonarcloud still says ‘0 Bugs’. On deeper analysis using verbose logging, I notice that the .c files that I am concerned about are treated as txt files and the sensor for Text files scans them. The cFamily sensor just skips those. Perhaps I am misunderstanding the logs, But the end result is that none of my c code is analysed.
Here is the snapshot of the overview page of the PR.
Thank you for this detailed report! When looking inside the build-wrapper-dump.json, I cannot find any mention of the led.c file, which explains that it is skipped during analysis.
To understand why I would need access to another file generated by the build wrapper: build-wrapper.log. Could you please provide it too?
So the build wrapper only monitors the cmake . command, not the real build… Since I don’t think anything interesting will come out of generating the project, I suggest you use the following instead: