A multitude of different coding standards are recommended by regulatory bodies, industry consortiums, and individual companies that are serious about software quality discipline. These various standards differ in some of their specifics but most recommend the following general guidelines, all of which are supported by Klocwork Insight.

GUIDELINE KLOCWORK SUPPORT
Ban explicit language features that can hide coding errors
  • For example, Klocwork detects multiple types of Assignment in Condition errors where only one branch is executed which may cause unexpected behaviour.
Eliminate multiple declarations in functions, classes, data types, macros, variables, etc.
  • Klocwork identifies interface violations such as multiple declarations within the code.
Only use pointer expressions after initialized.
  • Klocwork identifies critical code defects such as un-initialized variables.
Only include header files once.
  • Klocwork provides architectural analysis to identify violations such as the number of times a header file can be included.
Eliminate unused or unreachable code.
  • Klocwork identifies code defects such as unreachable code.
Place limits on the complexity of the software functions.
  • Klocwork provides automated metrics such as McCabe's cyclomatic complexity.

Customers can also leverage Klocwork's product extensibility through a powerful declarative language to completely customize the analysis of C, C++ and Java for any code base. This high-level language allows developers to easily extend Klocwork’s extensive built-in library by adding their own checkers to meet their unique organizational, regulatory or code base requirements. Read more about Klocwork Insight's extensibility framework.