I’d be curious as to whether anyone has been having success with using code analysis tools with Unity or Unreal.
It seems like they would be useful tools in these arenas but seem complicated to integrate or deliver.
I’m talking about tools like Gendarme (for Mono, for Unity) or SonarQube/SonarLint.
Problems seem to include:
-
Inability for C# analysers to deal with Unity object structures (e.g. not having a reference to what a MonoBehaviour is or why they seem to have hanging Start() and Update() methods not apparently called by anything). Gendarme looks like it may have a hope here, but it (nor any attempts to integrate it with Unity) hasn’t been maintained for years now it seems.
-
C++ analyses like FxCop (aka VS Code Analysis) requires enterprise edition VS, or $7k per year language pack add-in for SonarQube, which otherwise offers free tools for C# and Java worlds. I understand why - complexity involved and the lack of easy access to aids like Reflection - but the difficulty of such things hasn’t stopped other impressive projects being delivered before and it seems like an opportunity begging.
Has anyone managed to have experience of a tool that works with the code from these engines? Or is the only way to eyeball the code yourself, with peer reviews, and remain extra vigilant with the code you write?