Could someone please share a sonarqube github workflow example for C language project?

I try to create a github workflow to run sonarqube on a C language project. I found this github action: GitHub - SonarSource/sonarqube-scan-action. I tried this one, it didns’t work for C language repository because C language code needs to run build-wrapper before sonar-scanner.

And then I found this github action: GitHub - SonarSource/sonarcloud-github-c-cpp: Integrate SonarCloud code analysis to GitHub Actions when build wrapper or relative paths support is required. Use https://github.com/SonarSource/sonarcloud-github-action otherwise. But I don’t have SonarCloud available, I only have SonarQube available. So I got token issue.

Could someone please share a sonarqube github workflow example for C language project? Do I need create my own container or my own github action?

Thank you!

Hey there.

You should be able to find a suitable tutorial in this GitHub organization: SonarSource sample C and C++ projects with SonarCloud or SonarQube analysis configured · GitHub

Hi, Colin. Thank you for your reply. Could you please provide a specific repo link related to using sonarqube to analysis C code package under Linux to me? I checked the link you send to me. I can’t find an example by using sonarqube instead of sonarcloud. Thank you!

Make sure you click “View all Repositories”