New Msbuild Sonar runner is skipping analysis for .net projects

亡梦爱人 提交于 2019-12-06 14:41:17

Thanks for providing all these valuable details in your questions, which makes it easier to answer.

First of all, you can safely ignore the message C:\Users\raja.moparthi\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.cs : That file does not belong to your project, and does not have to be analyzed.

Then, I think that you are facing a limitation of the MSBuild SonarQube Runner 1.0 release, which is already fixed in the soon to be released 1.0.1 version: If the full path to your .csproj file contains test, the project will be detected as a test one, and SonarQube doesn't report issues on tests projects. See this tickets for details: https://jira.sonarsource.com/browse/SONARMSBRU-121 While waiting on this new release, the easiest thing you can do is simply to remove test from the folder names.

I still have the issue described by Dinesh using TFS' SonarQube Extension 2.0.0, which embeds SonarQube Scanner for MSBuild 2.2.0.24:

If the full path to your .csproj file contains test, the project will be detected as a test one, and SonarQube doesn't report issues on tests projects.

I've solved it by customizing the Test project pattern in Sonar Qube's Administration | Configuration | General Settings | Scanner for MSBuild.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!