Analysis succeed but too few violations are found
This often happens when the analysed Visual Studio solution has not Some tools like FxCop or Gendarme need compiled assemblies to perform analysis. In other words, they do not work on source code. Having too few violations most often comes from the following reasons:
- the Visual Studio solution hasn't been compiled prior to the
- Sonar analysis - whereas this is clearly mentionned in the documentation that it should
- the solution has been compiled but the corresponding generated assemblies have been moved somewhere else (because of a specific build process) and Sonar can't find them
- the solution has been compiled and the assemblies haven't been moved, but the whole solution folder has been moved to another location (and therefore the debug PDB files don't point to the original source locations)
Analysis succeed but only one test assembly/project is taken into account
Thanks a lot to Stéphane Lopes for the tip.
Gallio execution fails on a Windows 64bits system
If in the logs you get something such as:
[INFO] [23:30:05.643] A fatal exception occurred while running tests. Possible causes include invalid test runner parameters and stack overflows. [INFO] [23:30:05.727] Gallio.Model.ModelException: An exception occurred while invoking a test driver. ---> Gallio.Model.ModelException: Gallio.Model.ModelException: Could not load test assembly from 'C:\whatever\MyTestAssembly.Test.dll'. ---> System.BadImageFormatException: Could not load file...
that might be because some of your assemblies have been compiled with a x86 profile (32 bits) while Gallio is configured to run in an "Any CPU" mode, hence 64bits on your system.
This problem might be solved using corflags tool to force Gallio to run in a 32 bits mode as shown below:
corFlags.exe Gallio.Echo.exe /32BIT+ /Force
Some tests fail unexpectedly using a legacy .net2 library