Sonar C++ Community Plug-In
I Want to Get a Clarification That This Plug-in Only Works for C++ and Won't Work for C. I Tried to Run with C Code in the Src Directory and It Doesn't Return...
I want to get a clarification that this plug-in only works for C++ and won't work for C. I tried to run with C code in the src directory and it doesnt return anything unlike the C++ projects.
Anyway for me to run C code for free (Community versions), my cppcheck
2 Answers
The c++ community plugin will by default import any c files found under project dir, the parsing will be done using a compatibility mode (so it might not be complete). Default properties and values for this to work are:
sonar.cxx.cFilesPatterns - .c,.C
sonar.cxx.suffixes.sources - .cxx,.cpp,.cc,.c
sonar.cxx.suffixes.headers - .hxx,.hpp,.hh,.h
See details in documentation wiki
Not sure that you'll get an answer to this question on StackOverflow. I would ask this question by directly creating an issue on the relating github project :