PC-lint whole project analysis

Depending upon the analysis tool in use, by default Visual Lint will normally analyse each file in a solution individually, collating and presenting results for each file as they beome available. This is the most flexible approach, as it allows the analysis of individual files to be scheduled independently.

However, it is also possible to analyse all files within a single project together, in order to identify unused functions, enumerate types etc. In PC-lint terminology this is known as "whole project" analysis or "intermodule" analysis.

Functionally, a PC-lint whole project analysis task is identical to a sequence of single file analyses, with the addition of a post-processing phase to identify unused code. As such, a whole project analysis task requires the analysis of all files within it as a single batch, something which is significantly less flexible and often slower than single file analysis. The payoff is of course that this analysis method allows you to detect issues which are not shown in a conventional analysis.

You can select whether to use per-file or per-project analysis on the Analysis page in Visual Lint Options. If the currently selected analysis tool supports only a single type of analysis, only that one will be enabled and automatically selected.

In practice we find that single file analysis usually gets you 95% of the way. It is however worth running whole project analysis from time to time to identify any deadwood which may have crept into your codebase.



Copyright © 2004 - 2015 by Riverblade Ltd. All rights reserved.