Help with developing a custom plugin for c and c++

My Team is working on c source code detection.And my senior in our labs has written a project that could scan c and c++ projects and output a text report to describe the features of these projects.

I need to develop a c plugin for sonarqube 6-7 to support c detection.But I don’t know where to start?

I have seen some custom-plugin in github.But most are for Java.I have read documentation for sonarqube But it help little.

Could someone help me understand how to develop a c plugin based on the project my senior has written

Can you expand on this a little? Is this describing features, or something related to code quality?

I am really no help on custom plugin development (just to set expectations), but I did want to check-in on what you want this custom plugin to achieve and whether it makes sense in the context of SonarQube.

If your senior’s project is already outputting a text file, maybe you can simply adjust it to output data in a format that is readable by SonarQube and make use of Generic Issue Data.


1 Like

Since there is no open-source c++ plugin in SonarQube market. We intend to develop a c++ plugin. So this plugin is support c++ code scanning.

The project my senior written could output a text report. But it is just a command line program.We need to make it graphic. Our mentor think the best thing we can use is SonarQube. Just the question is how to connect SonarQube to the project. And I don’t know where to start

FYI our C/C++/Objective-C analyzer is actually free when using SonarCloud and analyzing open-source projects. BTW, there is actually an open source C++ plugin even if not supported by us.

Hello Massimo, thank you for your advice, it helped a lot ,I already did some modifications with the open-source projects.And it can work with the custom software we develop…

But the open-source plugin must be used with anthor tools such as Cppcheck or Clang-tidy.So our mentor give me a new task to develop a new C plugin.But there are so many things I dont know? As listed,as a developer.I could not find too many documents about how to develop a plugin or how SonarQube works.

1.Is the source-code-analyze mission all depends on the plugin? and SonarServer just put a platform The SonarScanner just scan the source-code?

2.If so? how the source-code be delivered to the language plugins?

Given that you cross posted (How sonarqube analyse source codes) I consider this thread closed.