fandrawsfandraws Posts: 1
edited October 2019 in C/C++test


As I was customizing a rule set I noticed a bug in COMMENT-04. It seems that if you run it on a directory with files, it works as indicated in the documentation. However, if you run it on a .sln, with multiple sub directories it flags many more (correctly commented) functions. I presume that it has to do with the way it recurses through translation units? Is there a fix or a way around this?


  • mstaronmstaron Posts: 26

    Currently, the COMMENT-04 rule triggers when the function has no comment preceding the declaration and definition. Due to it operates in the scope of the translation unit, it detects a declaration without comment, even if the function has a definition preceded by a comment in another translation unit.
    This behaviour will be improved in newer C++test version. The COMMENT-04 rule will only report on function definitions (if there is no declaration with a comment). In addition, the new COMMENT-04_b rule will be created, which will trigger on all declarations (even if definition is preceded by a comment).

Sign In or Register to comment.