Azure DevOps版本管道中的SonarQube分析

问题描述 投票:0回答:1

我正在将SonarQube Analysis配置为记录的here.。我在Azure DevOps的发布管道中执行此操作,并在“运行代码分析”步骤中获得以下响应;

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2019-02-24T13:15:56.0676808Z ==============================================================================
2019-02-24T13:15:56.3795288Z [command]D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.5.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
2019-02-24T13:15:56.4457312Z SonarScanner for MSBuild 4.5
2019-02-24T13:15:56.4458457Z Using the .NET Framework version of the Scanner for MSBuild
2019-02-24T13:15:56.4990756Z Default properties file was found at D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.5.1\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
2019-02-24T13:15:56.4991365Z Loading analysis properties from D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.5.1\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
2019-02-24T13:15:56.4995905Z Post-processing started.
2019-02-24T13:15:56.6737713Z 13:15:56.657  Fetching code coverage report information from TFS...
2019-02-24T13:15:56.6758971Z 13:15:56.673  Attempting to locate a test results (.trx) file...
2019-02-24T13:15:56.7292679Z 
2019-02-24T13:15:56.7293226Z ##[error]Unhandled Exception:
2019-02-24T13:15:56.7294610Z ##[error]System.ArgumentNullException: Value cannot be null.
Parameter name: path
   at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
   at SonarScanner.MSBuild.TFS.TrxFileReader.FindTrxFiles(String buildRootDirectory, Boolean shouldLog)
   at SonarScanner.MSBuild.TFS.BuildVNextCoverageReportProcessor.TryGetTrxFiles(AnalysisConfig config, ITeamBuildSettings settings, IEnumerable`1& trxFilePaths)
   at SonarScanner.MSBuild.TFS.CoverageReportProcessorBase.ProcessCoverageReports()
   at SonarScanner.MSBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, ITeamBuildSettings settings)
   at SonarScanner.MSBuild.BootstrapperClass.PostProcess()
   at SonarScanner.MSBuild.BootstrapperClass.Execute()
   at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
   at SonarScanner.MSBuild.Program.Main(String[] args)
2019-02-24T13:15:56.7295264Z System.ArgumentNullException: Value cannot be null.
2019-02-24T13:15:56.7295484Z Parameter name: path
2019-02-24T13:15:56.7295703Z    at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
2019-02-24T13:15:56.7296559Z    at SonarScanner.MSBuild.TFS.TrxFileReader.FindTrxFiles(String buildRootDirectory, Boolean shouldLog)
2019-02-24T13:15:56.7296793Z    at SonarScanner.MSBuild.TFS.BuildVNextCoverageReportProcessor.TryGetTrxFiles(AnalysisConfig config, ITeamBuildSettings settings, IEnumerable`1& trxFilePaths)
2019-02-24T13:15:56.7297035Z    at SonarScanner.MSBuild.TFS.CoverageReportProcessorBase.ProcessCoverageReports()
2019-02-24T13:15:56.7297270Z    at SonarScanner.MSBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, ITeamBuildSettings settings)
2019-02-24T13:15:56.7297477Z    at SonarScanner.MSBuild.BootstrapperClass.PostProcess()
2019-02-24T13:15:56.7297689Z    at SonarScanner.MSBuild.BootstrapperClass.Execute()
2019-02-24T13:15:56.7297965Z    at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
2019-02-24T13:15:56.7298557Z 

如何配置'path'参数?

sonarqube azure-devops
1个回答
0
投票

请参阅this指南以设置SonarQube并启动以管理技术债务。

© www.soinside.com 2019 - 2024. All rights reserved.