OCLint is a static code analysis tool for improving quality and reducing defects by inspecting C, C++ and Objective-C code and looking for potential problems like possible bugs, unused code, complicated code, redundant code, code smells, bad practices, and so on.


Static code analysis is a critical technique to detect defects that aren’t visible to compilers. OCLint automates this inspection process with advanced features:

  • Relying on the abstract syntax tree of the source code for better accuracy and efficiency; False positives are mostly reduced to avoid useful results sinking in them.
  • Dynamically loading rules into system, even in the runtime.
  • Flexible and extensible configurations ensure users in customizing the behaviors of the tool.
  • Command line invocation and configuration persistence facilitate continuous inspection of the code while being developed, so that technical debts can be fixed early on to reduce the maintenance cost.

Current Status

OCLint is far from finished but is being continuously improved in many aspects, e.g. accuracy, performance and usability.

OCLint started as a research project at the University of Houston. Since then, OCLint has been rewritten and grown to be a 100% open source project. OCLint is designed to serve both academia and industry. Our goal is to spread the importance of code quality, and to make OCLint a must-have tool for developers who program in C, C++ and Objective-C languages.

OCLint is compatible with macOS, major BSD and Linux variants. Porting to Windows is experimental with community effort.

Get Started

There is a large change that pre-compiled binaries are ready to download.

It’s also quite easy to start with getting the source code and building it locally in a specific environment.

Get Involved

Please also consider getting involved in the OCLint community. All kinds of contributions, like giving feedback, starting a discussion, filing issues, requesting new features, best of all, submitting a patch or two, are sincerely appreciated.