ObjC advanced static code analyzer


There is a built in code analyzer in Xcode but unfortunately it’s not that we really need. It doesn’t check complexity, method sizes etc.

This was one of the missing features till now because fortunately there is a good one out already: OCLint (http://oclint.org/)

Unfortunately there is still no correct Xcode project file read support in it, but there is a dirty solution by recursively read all the .m files in a folder. On the developer’s site there is a basic script for it. Since it was a bit old I updated the script and now works well with the latest Xcode.

Just put the following script into a .sh file and run in the root folder of the project (check the paths before run)