LSUnusedResources icon indicating copy to clipboard operation
LSUnusedResources copied to clipboard

希望可以适配R.Swift

Open ZClee128 opened this issue 1 year ago • 9 comments

https://github.com/mac-cain13/R.swift 因为swift项目管理资源使用这个库,希望可以适配一下

ZClee128 avatar Aug 01 '24 03:08 ZClee128

看上去似乎可以自己加针对 swift 文件的自定义正则表达式来实现这个需求?

获取 Outlook for iOShttps://aka.ms/o0ukef


发件人: ZClee @.> 发送时间: Thursday, August 1, 2024 11:29:52 AM 收件人: tinymind/LSUnusedResources @.> 抄送: Subscribed @.***> 主题: [tinymind/LSUnusedResources] 希望可以适配R.Swift (Issue #51)

https://github.com/mac-cain13/R.swift 因为swift项目管理资源使用这个库,希望可以适配一下

― Reply to this email directly, view it on GitHubhttps://github.com/tinymind/LSUnusedResources/issues/51, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABODDPW2FHCG7VPOMJMRVYLZPGTTBAVCNFSM6AAAAABLZVQ5H6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2DCMZXGE2TQNA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

tinymind avatar Aug 01 '24 03:08 tinymind

因为我使用图片的方式是 R.image.xxx(),如果使用现有的逻辑,我所有图片都是未使用

ZClee128 avatar Aug 01 '24 03:08 ZClee128

因为我使用图片的方式是 R.image.xxx(),如果使用现有的逻辑,我所有图片都是未使用

我明白你的意思,我说的是下面这个地方: image

可以针对 swift 改为类似这样:R\.image\.(w+)\(\)

tinymind avatar Aug 01 '24 04:08 tinymind

image 我安装的没有这个的?

ZClee128 avatar Aug 01 '24 05:08 ZClee128

哦哦,我运行源码就有了

ZClee128 avatar Aug 01 '24 05:08 ZClee128

我尝试改了,但是还是搜出了我使用的图片,不应该搜出没使用过的图片

ZClee128 avatar Aug 01 '24 05:08 ZClee128

我尝试改了,但是还是搜出了我使用的图片,不应该搜出没使用过的图片

你使用图片的代码可以贴一下吗?以及源码文件名后缀是什么?可能是正则表达式不太正确。

tinymind avatar Aug 01 '24 06:08 tinymind

这个库通过脚本会生成一个文件,文件内容 image 然后使用的代码是 image

ZClee128 avatar Aug 01 '24 06:08 ZClee128

image 我图片都放在这里

ZClee128 avatar Aug 01 '24 07:08 ZClee128