识别 iOS 项目中每个文件的 LOC - 基于 ObjectiveC 的应用程序开发
是否有工具可以为我提供有关项目中每个文件/类的数行的详细报告?
我试过CLOC。我得到的只是项目级别,这很好开始。我想要对每个课程进行详细的深入研究。我们有任何开源工具可以帮我做到这一点吗?
Is there tool that will give me a detailed report on number lines each file/class in project has?
I tried CLOC. All that I get is that the project level and that is nice to start with. I want a detailed drill down on each class. Do we have any open source tools that will do this for me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我只能在 http://www.literatureandlatte.com/freestuff/index.html
I only find Xcode Statistician at http://www.literatureandlatte.com/freestuff/index.html
我一直在为 Objective C 寻找一个好的开源指标计数器......我还没有找到......
你可以使用 ProjectCodeMeter http://projectcodemeter.com,但它不是免费的...但试用版可以使用 3 个月,当它用完时,我将其安装在我的笔记本电脑上,又得到了 3 个月的时间:)
i was looking for a good open source metrics counter for Objective C for a long time... i didn't find any yet...
you can use ProjectCodeMeter http://projectcodemeter.com, but it's not free... hovever the trial version works for 3 months and when it ran out i installed it on my laptop and got another 3 months :)
我使用 Xcode Assistant...
在此处下载...
I use Xcode Assistant...
Download here...
我建议使用 sloccount,您将按预期通过目录和文件获取 LOC。但是,您无法按班级获得 LOC。
如果这个限制没问题,只需在您正在使用的命令行中使用
--details
标志,例如,如果您在 Xcode 项目的根目录中运行 sloccount 命令::输出是有点难读,但你会得到你需要的所有信息。
如果您想要一份漂亮的报告并能够通过 HTML 报告深入查看目录/文件,我建议使用 Jenkins。只需通过 Jenkins UI 安装“Jenkins sloccount 插件”即可。
您可以在此博客文章<中了解如何设置它/a> (免责声明:我是作者)。您还可以看到此类报告的示例。
I recommend using sloccount, you will get the LOC by directories and files as expected. You won't be able to have the LOC by class however.
If this limitation is ok, just use the
--details
flag in the command line you are using, for example if you run the sloccount command in the root directory of your Xcode project::The output is a bit hard to read but you will get all the information you need.
If you want to have a nice report and be able to drill down in the directories/files via a HTML report, I suggest using Jenkins. Just install the 'Jenkins plugin for sloccount' via Jenkins UI.
You can see how to setup it in this blog article (disclaimer: I am the author). You will also be able to see examples of such reports.