-
Notifications
You must be signed in to change notification settings - Fork 117
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
Option to generate cppcheck reports as xml file #100
Comments
My version of cppcheck (1.82 on Ubuntu 18.04) does not document the What I would want to discuss are actual implementation details. (1) You suggest to add a cmake option. I wonder if such option would toggle the xml-output for all health checks or just for cppcheck. More specifically, would such an option be called (2) Alternative approaches are the ability to extend the command-line arguments passed to cppcheck at a more visible location in the setup. set(CPPCHECK_FLAGS "--enable=all --verbose --suppress=missingIncludeSystem
--xml --output-file="\\${CMAKE_CURRENT_BINARY_DIR}/cppcheck-\\${target}.xml") (3) What I currently test is the addition of more cmake targets where their names encode the output to xml.
I'm thinking of adding these additional cmake targets:
|
The 3 solutions seem interesting. My personal need is only about cppcheck so a I don't really like the 2nd suggestion. It forces people to know the arguments. It isn't very flexible neither. When manually building the project, I may want to get normal cppcheck reports and only generate the XML reports when running CI/CD. I like the 3rd option but I'm afraid it would make the project more and more complex if new health tools are added in the future. |
It would be nice to have an option to generate ccpcheck reports as an xml file. When calling cppcheck, using the
--xml --output-file=<output_file>
arguments forces cppcheck to output its report to the given file.The text was updated successfully, but these errors were encountered: