Menu

cppcheck command line option

2020-10-06
2021-01-28
  • Rakesh Narayanaswamy

    Dear friends,
    I am looking for cppcheck windows command line option for displaying the summary of errors/warnings/style issues etc kind of statistics output.
    We are using misra addon with cppcheck and we wanted statistics at the end , the below command we are using in visual studio External Tools. we wanted to know total count of misra violations on errors/warnings/styles.
    C:\Program Files\Cppcheck\cppcheck.exe --addon=misra.json --template=vs --inconclusive enable=all $(SolutionDir)
    please find the attached screenshot from visual studio which displays misra warnings, in the end we are expecting statistics on total count of warnings/styles/errors.
    Thanks in advance

     
  • CHR

    CHR - 2021-01-27

    Moderation is slow again ;)

     
  • Daniel Marjamäki

    I'm not sure what you want.

    do you want a command line option to display statistics?

    the quick solution is to run misra addon manually. It should write statistics when it finish.

    cppcheck --dump $(SolutionDir)
    python3 misra.py <somefile.c>.dump
    

    Well I am not against to add some option in cppcheck command line. We have an old ticket: https://trac.cppcheck.net/ticket/1019

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.