Hi,
I’m using the taks “Prepare Analysis Configuration - community v4.8.0” and “Run Code Analysis v5.1.0” from Azure DevOps to report the analyses to the server SonarQube Community v9.1.
In some .NetCore 5 projects, the lines of code are empty or null.
Configuration from the taks “Prepare Analysis Configuration - community”:
- task: SonarQubePrepareCommunityCommunity@4
displayName: ‘SonarQube Prepare Analysis’
inputs:
SonarQube: ‘${{ parameters.SCAServerConnection }}’
projectKey: ‘$(Build.DefinitionName)’
projectName: ‘$(Build.DefinitionName)’
projectVersion: ‘$(Build.BuildNumber)’
extraProperties: |
# Additional properties that will be passed to the scanner. Put one key=value per line
sonar.verbose=true
sonar.coverageReportPaths=$(Common.TestResultsDirectory)/Coverage/SonarQube.xml
sonar.dependencyCheck.htmlReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.html
sonar.dependencyCheck.reportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.xml
sonar.dependencyCheck.xmlReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.xml
sonar.dependencyCheck.jsonReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.json
sonar.dependencyCheck.htmlReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.html
sonar.dependencyCheck.reportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.xml
sonar.dependencyCheck.xmlReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.xml
sonar.dependencyCheck.jsonReportPath=$(Common.TestResultsDirectory)/dependency-check/dependency-check-report.json
Part of logs from console:
/usr/bin/dotnet /agent/_work/_tasks/SonarQubePrepareCommunityCommunity_33f55862-2cc1-4321-a3e5-6ff3d3f8600b/4.8.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll begin /k:Service
SonarScanner for MSBuild 4.7.1
Using the .NET Core version of the Scanner for MSBuild
…
I need help to figure out what I’m doing wrong.
Thanks.