I am trying to get metrics on a legacy Silverlight application. The MSBuild scanner seems to find issues, but the lines of code count is way off. It is reporting ~300 LOC, when the sonar scanner finds ~250,000 LOC. If that is the only problem, then I can deal with it. But, the LOC being off doesn't give me a lot of confidence.
It seems you could configure the sonar scanner by setting an mscorlib location parameter: sonar.silverlight.5.mscorlib.location. I haven't been able to find anything comparable for the MSBuild scanner.
Is there some configuration I am missing?
CodePudding user response:
For C# projects, the SonarQube Scanner for MSBuild is both preferred and recommended. It is designed to understand the layout of a C# project, recognize its pieces, and handle proper configuration of the analysis.
For other types of projects (E.G. those Java projects built with Maven or Gradle), other scanners are recommended. For a Silverlight project you should use the default/fallback SonarQube Scanner