Support caching of analyses (something similar to ccache)
Linting a large amount of files takes some time. This is normally not an issue, when running the analysis on build servers. The speed of PC-lint Plus is generally acceptable.
However, this is still a source of frustration and seemingly wasted time for developers, when linting large project locally. A typical workflow while working on code is that a developer will often run lint locally for small incremental changes. (while changing code or while fixing lint messages) Since PC-lint Plus has to run through all of the source files again to properly check global rules, it is frustrating to have to wait for exactly the same analysis for >100 files, when you have only changes in one. A caching function, similar to ccache would be very welcome there. Something like “same cpp file, same included headers, same options, ….” -> use previous analysis results.

-
David Chamberlain commented
Arpad Toth, could you elaborate on how a build system could take care of this?
I can see that a build system could help if you were only analyzing each file in isolation (e.g. with -unit_check). You could save the lint output for each source file into a text file and configure the build system to only rebuild the text file it if the source file changed.
But if you want 2-pass analysis with global wrap-up, I think you must have PC-lint Plus run over all files again, even if only a single source file was changed.
-
Arpad Toth commented
A proper build system should take care of this, like scons.