Looking for unused localizable strings would be a nice addition to the project.
There already exist a R.validate() function that could implement the look-up.
What do you guys think?
For sure that would make a nice addition, although I've seen that detecting unused things is pretty hard to do. For example a localizable string could be accessed by building the key at runtime, there is no way of knowing that the key is used for us.
Also the R.validate() method just checks if all images and other assets are available, not if they're used. These checks are performed runtime and I think "unused" checks should be compile time.
It would be nice if the Swift compiler warned about methods that are unused, then we would get this for free on all assets R.swift picks up. Until then I think it's pretty hard to do this correctly, but still it would be an awesome feature!
I think this would be solved with a generic dead code analysis tool.
But that falls outside the goals of R.swift.
For all the folks out there still looking for such tool, here is a solution
https://github.com/michaelnitsenko/abandoned-strings
@michaelnitsenko it won't work with R.swift because every localizable is listed in r.generated.swift and will be considered as used :(
Oh, I see, you introduced R.swift support to it. Sorry, my bad. And thank you for the tool!
Most helpful comment
For all the folks out there still looking for such tool, here is a solution
https://github.com/michaelnitsenko/abandoned-strings