iOS清理工程文件中为引用的类

链接传送:https://github.com/dblock/fui

Usage

gem install fui

Get Help

fui help

Find Unused Classes in the Current Directory

fui find

The find command lists all the files that contain unused imports and exits with the number of files found.

Find Unused Classes in any Path

fui --path=~/source/project/Name find

Skip Interface Builder (.xib) Files

Running fui with -x (or --ignore-xib-files) will, for example, mark Foo.h as unused when Foo.xib holds a reference to the Foo class and no other references to Foo.h exist.

fui -x --path=~/source/project/Name find

Ignore Local Imports

Running fui with -l (or --ignore-local-imports) will, for example, mark Foo.h as unused when Bar.h contains a local (quotation syntax) import of Foo.h (eg. #import Foo.h).

fui -l --path=~/source/project/Name find

Ignore Global Imports

Running fui with -g (or --ignore-global-imports) will, for example, mark Foo.h as unused when Bar.h contains a global (bracket syntax) import of Foo.h (eg. #import <Framework/Foo.h>).

fui -g --path=~/source/project/Name find

Ignore a Path

Running fui with -i (or --ignore-path) will, for example, ignore a Pods folder when searching for headers or referencing files.

fui --path=~/source/project/Name --ignore-path=Pods find

Ignore Multiple Paths

Running fui with -i (or --ignore-path) can ignore multiple folders when searching for headers or referencing files.

fui --path=~/source/project/Name --ignore-path=Pods --ignore-path=Libraries find

Delete All Unused Class Files with Prompt

fui --path=~/source/project/Name delete --perform --prompt

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • {"keys":[{"key2":"余华","key":"活着","url":"https://www.jians...
    书籍数据记录阅读 3,759评论 0 0
  • 最近自己写的简书文章太多了,导致很难找到之前写的文章。 于是,我想整理一篇目录,使用搜索快捷键:ctrl+F,即可...
    张云钱阅读 5,609评论 0 1
  • CC老师_HelloCoder 忆痕无殇ChiLeung邓亚洲lb_Tobesky 优秀学员博客 原地址:http...
    寂寞水蛙阅读 5,717评论 0 2
  • YEP插件功能评价(四) 七、游戏玩法插件 【自动被动状态】YEP_AutoPassiveStates 奶牛传送门...
    游学者狐狸阅读 11,183评论 0 12
  • 最近总是梦见童年的事,梦见高考…大概是对现状不太满意的缘故吧,所以在梦里和过往纠缠不清,有急切、焦灼和恐慌 春 我...
    天山游子阅读 1,417评论 0 0