-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sonar-cxx: To scan 'C/C++' code using the cxx plugin, do we need to compile the code using build_wrapper before running sonar-scanner? #2827
Comments
Hello @Ashokg6, please have first a look to our Wiki to understand the basics.
Regards, |
Hi @guwirth, Thanks for the info shared, let me go throw it . BR |
Hi @guwirth , I tried with the JsonCompilationsDatabase and manual insertion of include directories without compilation, but I'm getting below errors while parsing the include directories . Manually Included the included directories where I got the below error . Can you please guide me or share some clues why this parser errors are coming even I'm passing correct values as expected ? BR |
Before you create a new issue
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
My goal is to run the static analysis of 'C/C++' code using the above combination.
My question here is, to run static analysis of C/C++ code using the sonar-cxx plugin, do I need to compile the code by using "build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make" ? if yes do i need to add these flags - sonar.cxx.build-wrapper-output=bld/build_wrapper_output_directory , sonar.cxx.jsonCompilationDatabase=bld/build_wrapper_output_directory/compile_commands.json to add preprocessors, macros and include directories ?
OR )
This plugin only supports and only on static files, which does not require any compilation before scanning. ? If yes
In this case, how it will include/parse preprocessors, macros and include directories ?
I did not get any relevant document which can clarify these questions, so I'm requesting you to clarify it .
BR
Ashok G
The text was updated successfully, but these errors were encountered: