DEV Community

Sunish Surendran K
Sunish Surendran K

Posted on

Quality Metrics

Code Coverage

The percentage of code that is covered by (automated) unit tests.

Abstract Interpretation

Let's explain the abstract with an example.

if (obj == null) {
    obj = getObject();
}
obj.method();
Enter fullscreen mode Exit fullscreen mode

Here in the above example there is one problem abstract interpretation may detect that is the obj variable may have the value null even after line 2.

Cyclomatic Complexity

Programs with a lot of conditional statement or loops are more complex. This means maintainability of the program is hurt, since it is hard to understand for new developers working on it.

Compiler Warnings

Compiler warnings are potential errors in the source code that are discovered during compilation. These include syntactic errors for which the semantics are easily misinterpreted, portability issues and type errors.

Coding Standards

Coding standards provide rules for software developers to follow while writing code. The most important reason for coding standards is maintainability; a clear set of rules makes it easier for programmers to understand the meaning of code.

Code Duplication

Code Duplication is a software metric that indicates the amount of source code that occurs more than once in a program.

Fan Out

The fan out metric indicates how many different modules are used by a certain module.

For Python, the number of modules mentioned in the import statement are counted. from-import counts as 1.

Top comments (0)