How to find unused code in Xcode 7?

后端 未结 3 1216
有刺的猬
有刺的猬 2020-12-24 12:05

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 notif

相关标签:
3条回答
  • 2020-12-24 12:11

    In left side select Project and in Build Settings

    Unused functions, parameters, and values

    Other Warning Flags to -Wall -Wextra -Weverything

    0 讨论(0)
  • 2020-12-24 12:19

    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.

    0 讨论(0)
  • 2020-12-24 12:26

    To check the unused functions and variables you can also use the following scripts-

    https://github.com/PaulTaykalo/swift-scripts

    0 讨论(0)
提交回复
热议问题