<errorid="zerodiv"severity="error"msg="Division by zero."verbose="Division by zero."cwe="369"hash="11467244067432474819"><locationfile="1.c"line="1"column="13"info="Division by zero"/></error>
Don't you get the cwe attribute in your output?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I think it will be beneficial to have as attribute (in the XML reports) or wherever for each weakness reported by the tool the relevant CWE ID.
Developers, using cppcheck will have so the chance to refer to external documentation to better understand the weakness type.
Are there any change to have that feature implement in the next release ?
Many Thanks,
R.
We have it.. example error:
Don't you get the
cwe
attribute in your output?Do I need a separate option when running in cmd line to see the results like the example you gave?
I'd really appreciate it if you could give me an answer.
Last edit: Jiyoun 2025-01-14
--xml
gives the XML output.