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.

best static analysis rule for arithmetic complexity?

ajcurtis
ajcurtis Posts: 11

Hello,

I have found a few metrics that appear to address operator complexity. Halstead is the metric you find online. It looks like C++test supports several different Halstead complexity calculations but; a. they are not all enabled b. the ones that are enabled are not setup for violation detection. I also found VOCF which can be used for violation detection. It isn't clear if this is different from Halstead. It is also difficult to customize the threshold value.

Looking forward to hearing you methodology.

Tagged:

Comments

  • mstaron
    mstaron Posts: 35

    Metrics analysis results are available on DTP server (there are some Halstead metrics). Each metric uses a different value calculation (described in documentation for every metric). It is possible to set lower and upper thresholds for metrics. See documentation for metrics (Usage->Metrics Calculation). The value of VOCF is checked in rule METRICS-39 and its threshold value can be changed in RuleWizard.

  • ajcurtis
    ajcurtis Posts: 11

    The threshold for rule METRICS-39 can not be changed in the RuleWizard. I have been able to modify the threshold for other METRICS but not this one.