How can I analyze both python and C code in the same repo?

Okay, I figured it out. The reason it was failing is because the sonarcloud for c step wasn’t looking for the python coverage artifact, and the sonarcloud for python step was using the default sonarcloud-scan, which doesn’t work with c.

But since the c step is downloading and using sonar-scanner on command line, and this should in theory be able to do other languages at the same time, all you have to do is point it at the python too with

- sonar-scanner -Dsonar.projectKey=bio-firmware-algorithms -Dsonar.organization=bio -Dsonar.exclusions=lib/**/* -Dsonar.cfamily.build-wrapper-output=$BW_OUTPUT -Dsonar.python.coverage.reportPaths=coverage.xml

So no, I do not need a monorepo with multiple projects attached.

2 Likes