Why should I invest in a static source code analysis tool?
A preferable alternative to debugging by printf is to automatically conduct source code analysis with a lint tool before compiling the code. A lint tool will analyze your source code and find problems that a compiler typically won't catch, like bugs, glitches, inconsistencies, and redundancies. A lint tool helps speed development, save costs, and increase product quality by automatically performing a function that can otherwise take hundreds of programming-hours, establishing and documenting an automated debugging process, and eliminating problems early in the development project.
By having the programmer run his code through a static source analysis tool when the code is still fresh in his mind, it helps him to automatically identify and correct problems even before the code is compiled. This saves the risks and costs associated with problem identification and eradication later in the software development or product life cycle.
A good static source code analysis tool can also provide project managers with coding standards enforcement and statistical quality control measures by detecting noncompliance with codified style standards, by detecting maintenance or portability problems, and by computing customized quantitative indicators of code size, complexity, and density.