Show unused RESX file entries as warnings
Hello there
The ReSharper localization manager has the possibility via dropdown to search usings of a specifix resx entry. This is great, but it would be even cooler if I could check this information and get a ReSharper warning, if RESX entries are unused (as we have a lot of RESX files and are currently migrating them, leaving dead entries behind). The normal ReSharper warning doesn't work, as the RESX classes are autogenerated and therefore ignored by ReSharper (which is very fine, otherwise I'd get a lot of warnings there).
Is there a possibility to make this work with the current ReSharper tools? As the option to find RESX entry usings exists, I'd guess the tech is there?
With best regards
Matthias
Please sign in to leave a comment.
Hello Matthias Müller, thank you for your question.
As far as I can see it is possible to see unused resources in the Localization Manager if the following option "ReSharper | Options | Code Inspection | Settings | Enable solution-wide analysis" is enabled. In this case, unused resources will not be highlighted in bold. You can use Safe Delete for such resources (also available in the Localization Manager window).
Also, there is the following feature request about removing unused resources: Remove unused resources. Please comment or vote for it to get notifications about status changes. Thank you!
Hello Maria
Thank you for the feedback. The coolest thing I'd imagine would be to have a ReSharper code analysis option to check for unused RESX entries. This would make sure they are not cluttered without needing to manually check.
Matthias, thanks for the reply. I will share your comment with the team, thanks!