OCLint

Introducing Driver Module

Jun 15, 2013
Permalink

oclint-driver module has been added to replace oclint-clang-tooling module in the recent pull request. Essentially, we have learned from Clang Tooling, and in order to bring project-scope analysis into the picture, we changed certain behaviors of Clang Tooling by deriving from Clang Tooling code. So now, instead of holding only one translation unit at a time and analyzing on one simple abstract syntax tree (AST) unit, we compile all source codes for the entire projects, keep every units, therefore, when rules traverse one AST, it is also possible to refer other ASTs to have a larger context for better accuracy. In addition, it’s also possible to have pre-processing and post-processing in order to prepare prerequisite data in advance and summarize finally respectively.

This opens a lot of potentials to the project. Like project-scope metrics, project-scope rules, better accuracy, enhanced suppress, having compiler diagnostics integrated, etc, etc. In addition, in debug model, more intermediate information can be emitted to inform users the progress of invocation.

The command line interface should be completely back-compatible. Please try build from HEAD, and let us know if you like it.