Is Clang-tidy report supported in SonarQube 8.6?

Hi All!

I have an installation of SonarQube 8.6.0.39681 (on a windows server), with cxx plugin sonar-cfamily-plugin-6.15.0.25047 (or am I mistaken about which plugin handles C/C++?)
I am trying to have sonarqube include the clang-tidy report into to the SonarQube report.
I was following Use clang-tidy for static analysis and integration in Sonarqube | Blog blog("Baptiste Wicht");
The source code is built and scanned on a Ubuntu 18.04.
I try to read in the clang-tidy report with “-Dsonar.cxx.clangtidy.reportPath=build/clang_log_all”.

Full command:
SONAR_SCANNER_OPTS="-Djavax.net.ssl.trustStore=/usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts" sonar-scanner -Dsonar.projectKey=<project_key> -Dsonar.sources=. -Dsonar.host.url=https://<local_sonarqube_server> -Dsonar.login= -Dsonar.scm.provider=git -Dsonar.cfamily.build-wrapper-output=build/output -Dsonar.cfamily.threads=nproc -Dsonar.branch.name=<branch_name> -Dsonar.cfamily.cache.enabled=true -Dsonar.cfamily.cache.path=…/sonarcache -Dsonar.exclusions=/third_party//* -Dsonar.cxx.clangtidy.reportPath=build/clang_log_all

In the blog post, it is stated that you needed to build the snapshot of the latest version of the plugin. Did this feature not make it into the plugin? From which version? Is the command line option something else? How can I see which version of the plugin I am using?

Regards

Robert

Hello @robert.nilsson,

The blog post you mention is related to sonar-cxx, an unofficial analyzer that isn’t supported on this forum.
The SonarSource plugin for C/C++ is available on SonarQube, starting with Developer Edition.
Reading your message, I’m not really sure of what plugin you are using…

If you’re using sonar-cxx, I invite you to ask for help on their channel.
If you’re using sonar-cfamily, you would need to follow these guidelines in order to import this external report.

Out of curiosity, are there specific checks that you’re interested in that exist in clang-tidy but not in our plugin?

1 Like

Hi @Amelie,

Thanks for your response. That clears things up, we are only using the built-in sonar-cfamily plugin.

We have naming conventions setup in clang-tidy, that we would like to have included. Other than that, the checks may be equivalent.

Regards

Robert

1 Like

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