问题描述
我正在测试 SwiftLint 的(实验性)analyze
功能并且能够生成报告。现在我想让它们回到 Xcode 中并将它们显示为警告和错误。
使用 xcode
格式化程序/报告程序创建了这种结构的文件:
/absolute/path/to/source/Scenes/UpdateOS/UpdateOSviewmodel.swift:10:6: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
/absolute/path/to/source/Scenes/UpdateOS/UpdateOSviewmodel.swift:11:6: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
/absolute/path/to/source/Scenes/UpdateOS/UpdateOSViewController.swift:7:7: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
/absolute/path/to/source/Scenes/Home/Cells/Statistics/HomeStatisticsCellModel.swift:5:1: warning: Unused Import Violation: All imported modules should be required to make the file compile. (unused_import)
/absolute/path/to/source/Scenes/Home/Cells/Statistics/HomeStatisticsCellModel.swift:6:1: warning: Unused Import Violation: All imported modules should be required to make the file compile. (unused_import)
/absolute/path/to/source/Scenes/Home/Cells/Statistics/HomeStatisticsCard.swift:5:1: warning: Unused Import Violation: All imported modules should be required to make the file compile. (unused_import)
/absolute/path/to/source/Scenes/Home/Cells/Statistics/Extensions/SAP_Internal_Stats_Statistics+SupportedIDs.swift:5:1: warning: Unused Import Violation: All imported modules should be required to make the file compile. (unused_import)
/absolute/path/to/source/Scenes/Home/Cells/TraceLocations/HomeTraceLocationsCellModel.swift:10:6: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
/absolute/path/to/source/Scenes/Home/Cells/TraceLocations/HomeTraceLocationsCellModel.swift:11:6: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
/absolute/path/to/source/Scenes/Home/Cells/TraceLocations/HomeTraceLocationsCellModel.swift:12:6: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted. (unused_declaration)
是否有一种通用的方法可以将警告/错误列表“加载”到 Xcode 中?我的第一种方法是扩展 XcodeKit,但我希望这已经得到解决。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)