Menu

Verbose option: Show when "#error" is reached

2018-04-26
2018-05-11
  • Clint Chelak

    Clint Chelak - 2018-04-26

    It took a few days for me to understand why my code was spotty in showing errors. It seemed that when including certain headers, the configurations for my current file would stop showing. Adding --verbose flag didn't provide any additional useful detail.

    After chasing the error for quite some time, I found that as cppcheck ran through the include directories, it would find its way into a #error message (a problem I could clean in my code) and would give up on that runthrough.

    However, there was no indication of this occuring and the configurations messages would mysteriously disappear. Could we get a small message when --verbose is present to say when and how the current runthrough terminated. Something like the following:

    checking src/my/file.cpp ...
    [src/my/file.cpp:14] Runthrough terminated. "#error" detected.

    Or:

    [src/my/file.cpp:22] Runthrough terminated. Syntax error.

    I add that one because it took a while to find out that checking stopped when errors were encountered unlike messages with severities of warning, syntax, etc. Thanks in advance for your input,
    Clint

     
  • versat

    versat - 2018-04-27

    I also think that Cppcheck should output a message when it stops analyzing a file because of an error directive. I've had some trouble with this too and others also, so we are not alone ;)
    I found this ticket in trac where this already has been discussed many years ago:
    https://trac.cppcheck.net/ticket/1378

     
  • Daniel Marjamäki

    in latest git head, a information message is written.

     

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.