Hi Team,
I am getting an error that the main branch has no lines of code. If I check the Activity log, I can see the analysis has taken place, but in the overview I am getting this error.
- SonarQube Version 9.4
- SonarQube Installed via .zip
SonarQube Configuration:
job: SONAR_SCANNER
variables:
java: $(java.home)
steps:
- checkout: none
- task: SonarQubePrepare@4
inputs:
SonarQube: ‘SonarQube’
scannerMode: ‘CLI’
configMode: ‘manual’
cliProjectKey: ‘XXXXXXX’
cliProjectName: ‘XXXXXXXXX’
cliSources: ‘.’
extraProperties: |
sonar.exclusions=/*.html,/.bin ,/is/tests/,/is/packages//.xml.bak,
sonar.java.binaries=/code/classes
sonar.lang.patterns.flow=/.xml,**/.ndf,
sonar.lang.patterns.xml=/*.xsd,/.xsl
sonar.sourceEncoding=UTF-8
# This are commented below
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
#sonar.login=*****
#sonar.password=*****
#sonar.projectBaseDir=$(System.DefaultWorkingDirectory)/is/packages
- powershell: |
$params = “$env:SONARQUBE_SCANNER_PARAMS” -replace '“sonar.branch.name”:"[\w,/,-]",?’
Write-Host “##vso[task.setvariable variable=SONARQUBE_SCANNER_PARAMS]$params”
- task: SonarQubeAnalyze@4
- task: SonarQubePublish@4
inputs:
pollingTimeoutSec: ‘300’
condition: eq(variables.runSonarScan,‘true’)
SonarQube Logs:
2023-05-05T11:34:14.2720917Z 15:34:14.256 INFO: Indexing files... 2023-05-05T11:34:14.2722439Z 15:34:14.256 INFO: Project configuration: 2023-05-05T11:34:14.2723298Z 15:34:14.256 INFO: Excluded sources: **/*.html, **/*.bin, **/is/tests/**, **/is/packages/**/*.xml.bak 2023-05-05T11:34:14.3012952Z 15:34:14.288 DEBUG: 'src\azure-pipelines.yml' indexed with language 'yaml' 2023-05-05T11:34:14.3408309Z 15:34:14.335 DEBUG: 'XXXX.classpath' indexed with no language 2023-05-05T11:34:14.3450246Z 15:34:14.335 DEBUG: 'XXXX.project' indexed with no language 2023-05-05T11:34:14.3594189Z 15:34:14.350 DEBUG: 'XXXX.config\business_config.json' indexed with language 'json' 2023-05-05T11:34:14.3674605Z 15:34:14.366 DEBUG: 'XXXX.config\business_config.json.bak' indexed with no language 2023-05-05T11:34:14.3725099Z 15:34:14.366 DEBUG: 'XXXX.manifest.bak' indexed with no language 2023-05-05T11:34:14.3773639Z 15:34:14.366 DEBUG: 'XXXX.manifest.v3' indexed with no language 2023-05-05T11:34:14.4085888Z 15:34:14.397 DEBUG: 'XXXX.ns\AADC_CCB_Services\adapters\accountDetails\node.ndf' indexed with no language 2023-05-05T11:34:27.0141562Z 15:34:27.006 INFO: 760 files indexed 2023-05-05T11:34:27.0143169Z 15:34:27.006 INFO: 1238 files ignored because of inclusion/exclusion patterns 2023-05-05T11:34:27.0156853Z 15:34:27.006 INFO: Quality profile for json: Sonar way 2023-05-05T11:34:27.0158371Z 15:34:27.006 INFO: Quality profile for yaml: Sonar way 2023-05-05T11:34:27.0159719Z 15:34:27.006 INFO: ------------- Run sensors on module XXX 2023-05-05T11:34:27.1358448Z 15:34:27.131 INFO: Load metrics repository 2023-05-05T11:34:27.1811809Z 15:34:27.178 DEBUG: GET 200 | time=47ms 2023-05-05T11:34:27.1997255Z 15:34:27.193 INFO: Load metrics repository (done) | time=62ms 2023-05-05T11:34:29.3620369Z 15:34:29.349 DEBUG: 'JavaSensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3627714Z 15:34:29.349 DEBUG: 'Import external issues report' skipped because one of the required properties is missing 2023-05-05T11:34:29.3638562Z 15:34:29.349 DEBUG: 'Python Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3643032Z 15:34:29.349 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project 2023-05-05T11:34:29.3647704Z 15:34:29.349 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3658465Z 15:34:29.365 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3661697Z 15:34:29.365 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3664209Z 15:34:29.365 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3671218Z 15:34:29.365 DEBUG: 'Code Quality and Security for Go' skipped because there is no related file in current project 2023-05-05T11:34:29.3678974Z 15:34:29.365 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project 2023-05-05T11:34:29.3685550Z 15:34:29.365 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing 2023-05-05T11:34:29.3711158Z 15:34:29.365 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3712449Z 15:34:29.365 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3713400Z 15:34:29.365 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3714579Z 15:34:29.365 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3715569Z 15:34:29.365 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3716488Z 15:34:29.365 DEBUG: 'KotlinSurefireSensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3717536Z 15:34:29.365 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3720633Z 15:34:29.365 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing 2023-05-05T11:34:29.3723372Z 15:34:29.365 DEBUG: 'Import of ktlint issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3730704Z 15:34:29.365 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3738222Z 15:34:29.365 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project 2023-05-05T11:34:29.3740441Z 15:34:29.365 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project 2023-05-05T11:34:29.3749724Z 15:34:29.365 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project 2023-05-05T11:34:29.3755910Z 15:34:29.365 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing 2023-05-05T11:34:29.3757077Z 15:34:29.365 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing 2023-05-05T11:34:29.3759567Z 15:34:29.365 DEBUG: 'CSS Metrics' skipped because there is no related file in current project 2023-05-05T11:34:29.3766164Z 15:34:29.365 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3770281Z 15:34:29.365 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3777813Z 15:34:29.365 DEBUG: 'Import of RuboCop issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3780543Z 15:34:29.365 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project 2023-05-05T11:34:29.3786058Z 15:34:29.365 DEBUG: 'Scala Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3792351Z 15:34:29.365 DEBUG: 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project 2023-05-05T11:34:29.3799672Z 15:34:29.365 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3802947Z 15:34:29.365 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3810536Z 15:34:29.365 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3818252Z 15:34:29.381 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing 2023-05-05T11:34:29.3862039Z 15:34:29.381 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3867774Z 15:34:29.381 DEBUG: 'SurefireSensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3868852Z 15:34:29.381 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3869478Z 15:34:29.381 DEBUG: 'Flex' skipped because there is no related file in current project 2023-05-05T11:34:29.3870026Z 15:34:29.381 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project 2023-05-05T11:34:29.3870597Z 15:34:29.381 DEBUG: 'XML Sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3871159Z 15:34:29.381 DEBUG: 'PHP sensor' skipped because there is no related file in current project 2023-05-05T11:34:29.3871746Z 15:34:29.381 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project 2023-05-05T11:34:29.3872359Z 15:34:29.381 DEBUG: 'Import of PHPStan issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3873204Z 15:34:29.381 DEBUG: 'Import of Psalm issues' skipped because there is no related file in current project 2023-05-05T11:34:29.3902179Z 15:34:29.381 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing 2023-05-05T11:34:29.3911419Z 15:34:29.381 DEBUG: Sensors : JaCoCo XML Report Importer -> IaC CloudFormation Sensor -> CSS Rules -> C# Project Type Information -> C# Analysis Log -> C# Properties -> HTML -> Text Sensor -> VB.NET Project Type Information -> VB.NET Analysis Log -> VB.NET Properties 2023-05-05T11:34:29.3968327Z 15:34:29.381 INFO: Sensor JaCoCo XML Report Importer [jacoco] 2023-05-05T11:34:29.4094417Z 15:34:29.396 INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml 2023-05-05T11:34:29.4110950Z 15:34:29.396 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer 2023-05-05T11:34:29.4113536Z 15:34:29.396 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=15ms 2023-05-05T11:34:29.4114505Z 15:34:29.396 INFO: Sensor IaC CloudFormation Sensor [iac] 2023-05-05T11:34:29.4526797Z 15:34:29.443 DEBUG: 'XXXX.config/business_config.json' generated metadata with charset 'UTF-8' 2023-05-05T11:34:29.4764211Z 15:34:29.474 DEBUG: 'XXXX.config/business_config.json' generated metadata with charset 'UTF-8' 2023-05-05T11:34:29.4836771Z 15:34:29.474 DEBUG: 'src/azure-pipelines.yml' generated metadata with charset 'UTF-8' 2023-05-05T11:34:29.4962819Z 15:34:29.490 DEBUG: 'XXXX.business_config.json' generated metadata with charset 'UTF-8' 2023-05-05T11:34:29.5040802Z 15:34:29.490 INFO: 0 source files to be analyzed 2023-05-05T11:34:29.5349764Z 15:34:29.521 INFO: 0/0 source files have been analyzed 2023-05-05T11:34:29.5358810Z 15:34:29.521 INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=125ms 2023-05-05T11:34:29.5362875Z 15:34:29.521 INFO: Sensor CSS Rules [javascript] 2023-05-05T11:34:29.5402421Z 15:34:29.537 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped. 2023-05-05T11:34:29.5404107Z 15:34:29.537 INFO: Sensor CSS Rules [javascript] (done) | time=16ms 2023-05-05T11:34:29.5405255Z 15:34:29.537 INFO: Sensor C# Project Type Information [csharp] 2023-05-05T11:34:29.5432826Z 15:34:29.537 INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms 2023-05-05T11:34:29.5433514Z 15:34:29.537 INFO: Sensor C# Analysis Log [csharp] 2023-05-05T11:34:29.5632699Z 15:34:29.553 DEBUG: Project 'XXXX': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. 2023-05-05T11:34:29.5637722Z 15:34:29.553 INFO: Sensor C# Analysis Log [csharp] (done) | time=16ms 2023-05-05T11:34:29.5639848Z 15:34:29.553 INFO: Sensor C# Properties [csharp] 2023-05-05T11:34:29.5640866Z 15:34:29.553 DEBUG: Project 'XXXX': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. 2023-05-05T11:34:29.5642170Z 15:34:29.553 DEBUG: Project 'XXXX': No Roslyn issues reports have been found. 2023-05-05T11:34:29.5642997Z 15:34:29.553 INFO: Sensor C# Properties [csharp] (done) | time=0ms 2023-05-05T11:34:29.5643502Z 15:34:29.553 INFO: Sensor HTML [web] 2023-05-05T11:34:29.5740185Z 15:34:29.568 INFO: Sensor HTML [web] (done) | time=15ms 2023-05-05T11:34:29.5741992Z 15:34:29.568 INFO: Sensor Text Sensor [text] 2023-05-05T11:34:29.5772252Z 15:34:29.568 INFO: 4 source files to be analyzed 2023-05-05T11:34:29.5934492Z 15:34:29.584 INFO: 4/4 source files have been analyzed 2023-05-05T11:34:29.5935207Z 15:34:29.584 INFO: Sensor Text Sensor [text] (done) | time=16ms 2023-05-05T11:34:29.5935821Z 15:34:29.584 INFO: Sensor VB.NET Project Type Information [vbnet] 2023-05-05T11:34:29.5952872Z 15:34:29.584 INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms 2023-05-05T11:34:29.5953460Z 15:34:29.584 INFO: Sensor VB.NET Analysis Log [vbnet] 2023-05-05T11:34:29.6249356Z 15:34:29.615 DEBUG: Project 'XXXX': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. 2023-05-05T11:34:29.6253040Z 15:34:29.615 INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=31ms 2023-05-05T11:34:29.6254023Z 15:34:29.615 INFO: Sensor VB.NET Properties [vbnet] 2023-05-05T11:34:29.6255857Z 15:34:29.615 DEBUG: Project 'XXXX': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. 2023-05-05T11:34:29.6257442Z 15:34:29.615 DEBUG: Project 'XXXX': No Roslyn issues reports have been found. 2023-05-05T11:34:29.6258295Z 15:34:29.615 INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms 2023-05-05T11:34:29.6333532Z 15:34:29.631 INFO: ------------- Run sensors on project 2023-05-05T11:34:29.6795929Z 15:34:29.678 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing 2023-05-05T11:34:29.6798398Z 15:34:29.678 DEBUG: 'C#' skipped because there is no related file in current project 2023-05-05T11:34:29.6804513Z 15:34:29.678 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6806260Z 15:34:29.678 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6813391Z 15:34:29.678 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6815875Z 15:34:29.678 DEBUG: 'VB.NET' skipped because there is no related file in current project 2023-05-05T11:34:29.6822739Z 15:34:29.678 DEBUG: 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6826090Z 15:34:29.678 DEBUG: '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6835461Z 15:34:29.678 DEBUG: 'VB.NET Unit Test Results Import' skipped because there is no related file in current project 2023-05-05T11:34:29.6837194Z 15:34:29.678 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project 2023-05-05T11:34:29.6841568Z 15:34:29.678 DEBUG: Sensors : Zero Coverage Sensor 2023-05-05T11:34:29.6846525Z 15:34:29.678 INFO: Sensor Zero Coverage Sensor 2023-05-05T11:34:29.7204729Z 15:34:29.709 INFO: Sensor Zero Coverage Sensor (done) | time=31ms 2023-05-05T11:34:29.7261628Z 15:34:29.724 INFO: CPD Executor Calculating CPD for 0 files 2023-05-05T11:34:29.7273852Z 15:34:29.724 INFO: CPD Executor CPD calculation finished (done) | time=0ms 2023-05-05T11:34:29.7540029Z 15:34:29.740 DEBUG: SCM revision ID '6e5fe079fc258f74b626adf3210cb1662dff0416' 2023-05-05T11:34:29.8752435Z 15:34:29.849 INFO: Analysis report generated in 125ms, dir size=113.0 kB 2023-05-05T11:34:29.9679471Z 15:34:29.959 INFO: Analysis report compressed in 110ms, zip size=13.2 kB 2023-05-05T11:34:29.9685401Z 15:34:29.959 INFO: Analysis report generated in XXXXXX 2023-05-05T11:34:29.9686319Z 15:34:29.959 DEBUG: Upload report 2023-05-05T11:34:30.0897922Z 15:34:30.084 DEBUG: POST 200 | time=125ms 2023-05-05T11:34:30.0944279Z 15:34:30.084 INFO: Analysis report uploaded in 125ms 2023-05-05T11:34:30.1211051Z 15:34:30.115 DEBUG: Report metadata written to XXXX.report-task.txt 2023-05-05T11:34:30.1212598Z 15:34:30.115 INFO: ANALYSIS SUCCESSFUL, you can find the results at: XXXX 2023-05-05T11:34:30.1213763Z 15:34:30.115 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report 2023-05-05T11:34:30.1214543Z 15:34:30.115 INFO: More about the report processing at XXXX 2023-05-05T11:34:30.1280106Z 15:34:30.115 DEBUG: Post-jobs : 2023-05-05T11:34:30.1376904Z 15:34:30.131 INFO: Analysis total time: 19.718 s 2023-05-05T11:34:30.1418487Z 15:34:30.131 INFO: ------------------------------------------------------------------------ 2023-05-05T11:34:30.1419512Z 15:34:30.131 INFO: EXECUTION SUCCESS 2023-05-05T11:34:30.1420021Z 15:34:30.131 INFO: ------------------------------------------------------------------------ 2023-05-05T11:34:30.1420485Z 15:34:30.131 INFO: Total time: 22.546s 2023-05-05T11:34:30.2000801Z 15:34:30.193 INFO: Final Memory: 15M/68M 2023-05-05T11:34:30.2001922Z 15:34:30.193 INFO: ------------------------------------------------------------------------ 2023-05-05T11:34:30.7999016Z ##[section]Finishing: SonarQubeAnalyze