Hi,
I am developing using Visual Studio Community Edition. And I am spoiled by using the Lint tool built into Android Studio. I was wondering if there was a great Lint tool to go with VSC. Currently I am using SonarLint but it does not recognize the MonoBehaviour hooks like Start(), Update() (thinks that they are never called). Or rather is there any way to make SonarLint understand that?
In your project, right click anywhere in Assets and there should be an option:
Import package → Visual Studio 20xx tools
“xx” should be whatever version Visual Studio you have, and considering you said “Community” edition, I assume you mean 2015 (which is what you should be using).
After you properly import the tools, the “Sync MonoDevelop project” button will be replaced with “Open C# Project” button which will open up Visual Studio natively, as well as get rid of all unity specific warnings such as functions being called or publics not being assigned.
Well, I am using 2015, and I have the unity tools extension installed in VS. The issue with normal intellisense is that I do not feel it having as much power as say IntelliJ.
There’s several 3rd party tools that do that sort of stuff.
Resharper
FxCop
etc.
There’s also the built in ‘Code-Analysis’ tool in Visual Studio.
If you need things to ignore/catch unity specific things that aren’t obvious to the analyzer (like unity messages where are called via reflection, which may throw up flags for unused members with such tools), you’ll need to modify the rule set for whatever analyzer you decide on using.