我正在使用以下命令在debian上使用msbuild进行分析:
mono /msbuild/SonarQube.Scanner.MSBuild.exe begin /d:sonar.login=<sonarqubetoken> /d:sonar.host.url=https://<my-server> /d:sonar.exclusions=test/**/* /k:<my-project-key>
但是在end
命令中:
INFO: Index files
INFO: Excluded sources:
INFO: test/**/*
INFO: 17 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: Quality profile for cs: Sonar way
INFO: Excluded sources for coverage:
INFO: test/**
并且我服务器的UI上的分析包括来自test/
文件夹的文件。
为什么无法忽略特定文件?
使用SonarQube 6.7
和sonar-scanner:3.3
我设法解决这种情况的唯一方法是将以下行添加到.csproj
要排除的项目文件中
<!-- Exclude the project from SonarQube analysis -->
<SonarQubeExclude>true</SonarQubeExclude>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句