Objective C - Code sniffer - objective-c

I am looking for coding standard checker something like php_codesniffer (http://pear.php.net/manual/en/package.php.php-codesniffer.intro.php) for objective c.
Thanks,
Jose Antony

Maybe check out Uncrustify, there is also a fork with better Objective-C support. If you want to integrate uncrustify into xcode, read the blog post: Adding a code beautifier script to Xcode

The LLVM static analyzer is your answer.
In Xcode, you can use the build and analyze feature.
If you want to invoke it manually, see this LLVM web page.

Related

Make command is usable for Objective-C project?

I'm looking for an Objective-C open source project with Makefile, but I didn't find anything like that. I need that to test my clang static analyser project. Is it possible to make an Objective-C project?
Using make for Objective C is certainly possible, and quite convenient.
Example is here: https://github.com/wkoszek/objc_edu/blob/master/makefile

How do I convert HTML to Markdown in iOS/OS X? Any way to use pandoc in the app?

I have an HTML string that I'd like to convert to markdown. The best tool I've found to do this is pandoc, which is written in Haskell. How can I get pandoc to run inside a Mac/iOS app? I've heard of compiling Haskell to ARM for incorporation into an iOS project, but I have no idea how to actually get pandoc to compile and work inside an Objective-C app.
Thanks,
Robert
I will attempt to help you on how you use pandoc from objective-c part of your question. Objective-C is a superset of C, or so I have been told, meaning valid C code is valid Objective-C code.
So you question could have been worded how do I call haskell from C, which there is a nice wiki page about.
How you get all of this working on IOS and arm is another ball of yarn and would be more likely to be answered when broken into another question.

objective-c tags file for vim

I'd like to use Vim for editing sources and Xcode for all other purposes like managing, debugging etc. I've installed cocoa.vim plugin and it helps with highlighting, but I still need a way to navigate around the code. In java project I used ctags for the purpose, but it doesn't support obj-c.
So the question is: what is the easiest way to generate vi-compatible tags file for Objective-C sources?
I'm the author of the second link that jelera pointed to and must say it is now out of date.
I would follow the advice in the accepted answer of Alternatives to Ctags/Cscope with Objective-c? in order to get full Obj-C parser support in ctags.
If you use tagbar, this post will help get the new ctags binary working with it:
http://bastibe.de/2011-12-04-how-to-make-tagbar-work-with-objective-c.html
This is pretty much the setup I now use.

Is there a version of GNU indent which supports Objective C?

If so where can I get it?
Uncrustify seems to be useful. I haven't tested it yet.
Here is a brach that claims
Code beautifier and a very mighty one at that.
This fork aims to improve support for Objective-C/Objective-C++.
Here you'll find a config for objC.
This blogpost describes how to run uncrustify from xcode

Documentation Framework like JavaDoc for Objective C

Does Objective C have a documentation framework similar to JavaDoc where documentation can be generated from the source code?
Doxygen! You can use it for many languages, including Objective-c
Good news for all! :D Finally after waiting a long time Apple has introduced a parser comments for our projects. According to the new features in XCode 5:
Project documentation from framework API reference documentation and
structured comments in your own source code are displayed in the quick
help panel and in code completion popover views. Doxygen and HeaderDoc
structured comments are supported formats.
and from the Clang 3.2 release notes:
Clang parses the comments and can detect syntactic and semantic errors
in comments. These warnings are off by default. Pass -Wdocumentation
flag to enable warnings about documentation comments.
If you want to see an example of this new feature I recommend you take a look at the following article: Documentation in Xcode 5
Doxygen is quite popular among Obj-C developers.
You could have a look to HeaderDoc wich is the apple documentation framework similar to Java.
Appledoc has become very popular. . . version 1 was based on Doxygen, whereas version 2 was written from the ground up.
It doesn't quite have all the features of Doxygen (charts, enums, C++ classes, etc), but what it does offer is beautifully formatted docs in HTML of IDE integrated format.
Also interesting to note is the following:
The CocoaPods tool includes Appledoc documentation for the libraries that it installs. Quite handy.