10.2 Static Analysis
10.2.1 Introduction
It is one thing to say that we need to evaluate code, but quite another to decide exactly what to evaluate. The issues are as follows:
- Which code features should be assessed?
- Which code features can be assessed?
- What do the test results actually tell us about the quality, reliability, maintainability, and other parameters of the code?
The testing community generally agrees that the following items contribute to the quality of code:
- Overall program structure
- Program design techniques
- Code readability
- Code complexity
- Input/output dependencies within programs
- Data usage within programs
These features can be extracted from the source code itself. But, in order to properly assess them, we also need to take into account the software development process itself.
The following sections deal with techniques that can be applied to most software projects. However, experience has shown that...