Menu

[Cppcheck 2.18.0] serious regression (--cppcheck-build-dir)

2025-08-12
2025-08-28
  • Dave Ohlsson

    Dave Ohlsson - 2025-08-12

    Cppcheck has a very useful option: --cppcheck-build-dir. According to --help, one advantage of this option is:

    faster analysis; Cppcheck will reuse the results if
    the hash for a file is unchanged.
    

    And indeed, when we run Cppcheck 2.14.2 on our whole project with --cppcheck-build-dir, the first time takes about 14 minutes, but if we run Cppcheck again with --cppcheck-build-dir without making any changes to the code to be analyzed, it now takes only about 1 minute.

    With Cppcheck 2.18.0, however, we do not observe any speed-up. Running Cppcheck on our whole project with --cppcheck-build-dir takes about 15 minutes the first time, and also the second time.

    I didn't try with versions between 2.14.2 and 2.18.0.

    Is this a known regression?

     
  • CHR

    CHR - 2025-08-12

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14064

     
  • Dave Ohlsson

    Dave Ohlsson - 2025-08-25

    I noticed from https://trac.cppcheck.net/ticket/14064 that this is now fixed. Thank you!

    Do you know when the next version (which I presume will include this fix) will be available?

     
  • Dan Workman

    Dan Workman - 2025-08-28

    Urgh I've spent a few hours today assuming it was something local that had caused this...

    Please can we get a 2.19 ASAP?

    Ours went from a few seconds to 8 minutes each time we run the tool so I've had to rollback

     

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.