Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

COMMENT-04 Bug

Options
fandraws
fandraws Posts: 1
edited October 2019 in C/C++test

Hey,

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?

Comments

  • mstaron
    mstaron Posts: 35
    Options

    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).