开发者

Objective-C static analysis tools -- plugin to Xcode?

Are there any tools out there for Objective-C / Xcode? Something that can do one or more of the following:

  • Detect unused imports
  • Auto-synthesize properties
  • Autogener开发者_JAVA技巧ate dealloc method from retained properties
  • Provide method stubs for interface


-Detect unused imports

Not sure of anything that checks for dead imports.

-Auto-synthesize properties -Autogenerate dealloc method from retained properties

User Scripts work quite well to do this inside Xcode, you can also use a program like Acessorizer as mentioned but it pastes something onto the clipboard for you to paste.

-Provide method stubs for interface

type "init" just after @implementation, and type Control-. (period).

These are user macros (not scripts), and you can easily define your own. Note they have placeholders that you can use tab to jump to the bits to fill in.


You want to look at Kevin Callahan's Accessorizer, which can do several of the things you request and more. The Google Toolbox for Mac also includes an Xcode plugin that can remove whitespace and a few other things.


You could probably do something with AppleScript or another scripting language, called via AppleScript, to operate on method or header files.


If you want static analysis, Clang is built in to all recent releases. None of what you've described has anything to do with static analysis, however.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜