我们目前正在使用SonarQube Scanner for VSTS/TFS 4.1.1(使用SonarQube Scanner 4.1.1).
对于我们解决方案中的某些项目(模块),我们希望从分析和代码覆盖率统计信息中排除文件.这应该通过使用文件模式而不是修改TFS构建任务以可维护的方式完成.
|- Source
|- ProjectA
|- Scripts (should be excluded)
|- OwnCode
|- ProjectB
|- Views (only code coverage should be excluded)
|- Presenters
|- ...
|- ProjectC
|- Scripts (should be scanned)
|- ...
|- ...
|- Solution.sln
Run Code Online (Sandbox Code Playgroud)
sonar.exclusions="$(Build.SourcesDirectory)\Source\ProjectA\Scripts\**\*.js"类似于覆盖范围)**/ProjectsA/Scripts/**/*.js**/ProjectA/Scripts/**/*.js**/ProjectB/Views/**/*.cssonar-project.properties files are not understood by the SonarScanner for MSBuildSonarQube Web界面中的扫描程序上下文的日志是:
Settings for module: Solution:Solution:6FA7B5C2-667D-4387-98B9-445617F2AC0B
- …Run Code Online (Sandbox Code Playgroud)