OCLint

How It WorksΒΆ

OCLint checks source code against rules, and produces a report.

  1. Pass input files and program options to OCLint
  2. OCLint hands the input file off to parser in libclang
  3. OCLint gets an Abstract Syntax Tree (AST) from libclang
  4. Traverse AST, for each of the node, apply every rule in the ruleset and check for problems. The whole AST only be traversed once. For each of the nodes in AST, apply all rules in RuleSet to it.
  5. The violations are now stored in the ViolationSet, and OCLint will choose a reporter to render output.