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.
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.
There is a large change that pre-compiled binaries are ready to download.