Menu

How can I get Cppcheck to return with exit code != 0 with option --check-config?

2021-03-06
2021-03-29
  • Dave Ohlsson

    Dave Ohlsson - 2021-03-06

    I use Cppcheck 2.3 in Ubuntu 18.04.

    When I run Cppcheck without option --check-config and without option --error-exitcode on a project and I get errors, Cppcheck exits with exit code 0.

    When I run Cppcheck without option --check-config and with option --error-exitcode=1 on a project and I get errors, Cppcheck exits with exit code 1.

    When I run Cppcheck with option --check-config and without option --error-exitcode on a project and I get errors, Cppcheck exits with exit code 0.

    So far, this is as documented and as expected. However:

    When I run Cppcheck with option --check-config and with option --error-exitcode=1 on a project and I get errors, Cppcheck exits with exit code 0.

    How can I use option --check-config and get Cppcheck to exit with exit code different from 0 when Cppcheck generates errors?

     
  • Daniel Marjamäki

    hmm I guess you should get exit code 1 then.. I have created https://trac.cppcheck.net/ticket/10224

     

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.