如何在Xcode 7中找到未使用的代码? [英] How to find unused code in Xcode 7?

查看:177
本文介绍了如何在Xcode 7中找到未使用的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过



您还可以通过将其他警告标志设置为<$ c $轻松启用严格警告c> -Wall -Wextra -Weverything 。



检测未使用代码的另一个选项是使用代码覆盖率


I have seen this question, but the answer doesn't seem to be valid in Xcode 7. At least I can't find it.

Can anyone tell me where can I tell the compiler to notify me about unused functions/parameters/values ?

解决方案

Xcode has a number of settings you can enable to warn you about things like unused functions, parameters, and values.

You can also easily enable strict warnings by setting your Other Warning Flags to -Wall -Wextra -Weverything.

Another option for detecting unused code is by using Code Coverage.

这篇关于如何在Xcode 7中找到未使用的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆