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 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 :

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest