How to preview Sonar issues with CLion?

We have a SonarQube server with the SonarCFamily plugin. This works great for displaying project reports after our C++ CI builds run.

This does not work so well with our IDE, CLion. There is no SonarLint support for CLion yet. So we used to use the sonar.issuesReport.html.enable flag on local builds so we could get Sonar analysis before checking in our code. We recently upgraded our SonarQube and plugins, and now this flag has been deprecated as well.

Is there any way we can check our code before submitting to CI?

We do have the SonarQube Community plugin but have not figured out if this can do the job or not. Anyone have success with that tool?

1 Like

Hi @retrogamer,

unfortunately we are not providing SonarLint for CLion yet, it might come in the future but nothing short-term.

Do you have a suggestion as to how we can get Sonar analysis before submitting code now that sonar.issuesReport.html is deprecated?

Hi @retrogamer,

Are you working with pull requests? Those days this is a very popular way to have code review before merging in the main branch, including review from automated tools like SonarQube.

We do not use pull requests at this time. We are doing trunk based development.with direct commits. We do plan to move to GIT and a pull request operating mechanism in the future, but that is still a year out or so.

Hi @retrogamer,

then I am worried you will have to wait either for pull-requests analysis or SonarLint for CLion.