Static code analysis is a great way to find/prevent bugs, and the Clang static analyzer has been a part of Xcode since version 3.2.
The Clang static analyzer has been a part of Xcode for quite some time, and provides a great way tool for finding/preventing potential issues.
Recently I came across another open source static code analysis tool called OCLint that works with Objective-C, C and C++.
If you have some custom rules that you’d like to check for such as checking for overly long methods/complex code and other bad practices than then you may want to give it a look.
You can find the OCLint homepage here with links to binary downloads and the source can be found on Github here.
You can find the documentation for changing the rules here.
I tested this tool from the command line, but there is an experiemental helper program for working with Xcode.
If you take a look at the rules directory of the source code you can play around with and tweak rules.
- Tutorial: Debugging Objective-C Memory Leaks For Beginners
- Great Map Kit Alternative (Tutorial and Video Demo)
- Avoid Retain Cycles In Objective-C
- Open Source iOS Component That Enables Pull To Refresh With One Line Of Code
- Tutorial: Finding Memory Leaks With The Allocations Instrument And Heapshot Analysis
Original article: Alternative Objective-C Static Code Analyzer With Complexity Checking/Easily Customizable Rules
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.





