Resharper Command Line Tools - Cleanup Code Unity support

Hi,

We are trying to use CLI tools with a Unity project but we are getting false positive warnings regarding Untiy-specific syntax. Is there a way to configure the tools to disable these warnings?

<Issue TypeId="UnassignedField.Compiler" File="…Toolbar.cs" … Message="Field 'undoAll' is never assigned" />
<Issue TypeId="UnusedMember.Local" File="…Toolbar.cs" … Message="Method 'OnDestroy' is never used" />
0
5 comments

Hello Nickmorhun, thank you for your question. Could you please clarify whether you have “--no-swea” key specified in the command?

0

Hello Maria Pleskunina . Thank you for quick response. Yes, we have that. Is SWEA neccessary? The fields and methods affected are private by design, used with reflection. We don't add any attributes because Rider recognises this syntax and doesn't complain.

0

Hello Nickmorhun , thank you for your reply. You are right, SWEA has nothing to do with it. When running the command line tool, you need to use Unity plugin so that the tool knows something about Unity-specific constructs. Please try using the following key in your command: “-x=JetBrains.Unity”. 

Unfortunately, when I run such a command, I get exceptions. I opened a new issue about it. But I don’t see any more similar inspections ('xxx' is never used) in the code inspection report. Let me know how it works for you. Thank you!

0

Hello Maria Pleskunina , thank you. I have now tried the option that you had provided. Indeed, it gives me even more exceptions and returns an empty issue list. I noticed that a new 2023.3 tools version was released. I tried it, and it gives the “Warning: Can't find plugin JetBrains.Unity”. I noticed the comment in your ticket that this may be fixed soon.

0

Hello Nickmorhun, you're right, there is no Unity plugin for 2023.3 yet. But I hope it will be released soon. If you have any problems with the new plugin version, please let us know. Thank you!

0

Please sign in to leave a comment.