2 Add better summary of available checks.
source | link

I’ve had some success using a tool called CppCheck via a Jenkins CI system. I don’t specifically track conditional branches, but, the amount of checks this tool provides is worth the look. InIn particular, it lists the following code check the Condition part which lists various checks for conditions that are always true/false (including value tracking, duplicate conditions, interval logic), but other categories also list some possibly useful checks like:

“identical code in both branches of if/else or ternary operator.”

  • “pointer addition in condition“
  • “identical code in both branches of if/else or ternary operator.”
  • other types of suspicious or redundant conditions (for STL, strings, logic/numeric operations, ...)

And, it’s available as a plugin for your IDE.

I’ve had some success using a tool called CppCheck via a Jenkins CI system. I don’t specifically track conditional branches, but, the amount of checks this tool provides is worth the look. In particular, it lists the following code check:

“identical code in both branches of if/else or ternary operator.”

And, it’s available as a plugin for your IDE.

I’ve had some success using a tool called CppCheck via a Jenkins CI system. I don’t specifically track conditional branches, but, the amount of checks this tool provides is worth the look. In particular, check the Condition part which lists various checks for conditions that are always true/false (including value tracking, duplicate conditions, interval logic), but other categories also list some possibly useful checks like:

  • “pointer addition in condition“
  • “identical code in both branches of if/else or ternary operator.”
  • other types of suspicious or redundant conditions (for STL, strings, logic/numeric operations, ...)

And, it’s available as a plugin for your IDE.

1
source | link

I’ve had some success using a tool called CppCheck via a Jenkins CI system. I don’t specifically track conditional branches, but, the amount of checks this tool provides is worth the look. In particular, it lists the following code check:

“identical code in both branches of if/else or ternary operator.”

And, it’s available as a plugin for your IDE.