Coverage report of a branch not reported in sonar console

Hi everyone!

I’m executing manual analysis using this .properties file:

sonar.projectKey=cuentame-v2234-backend
sonar.organization=test
sonar.host.url=https://sonarcloud.io

# Nombre y versión del proyecto mostrados en la UI de SonarCloud
sonar.projectName=Cuentame V2 Backend
#sonar.projectVersion=1.0

# Ruta relativa al archivo sonar-project.properties. Reemplaza "\" por "/" en Windows.
sonar.sources=.

# Directorios de pruebas
# sonar.tests=src/controllers/test,src/models/test,src/helpers/test,src/utils/test

# Cobertura de código
sonar.javascript.lcov.reportPaths=coverage/lcov.info


# Exclusiones: directorios y archivos a excluir del análisis
sonar.exclusions=node_modules/**,build/**,dist/**,coverage/**,logs/**,docs/**,src/config/**, src/middleware/**, src/constants/**, src/interceptors/**, src/controllers/**, src/schemas/**, src/models/translations/**, src/models/roles/**, src/cron/**, src/routes/**

# Exclusions from duplications analysis
sonar.cpd.exclusions=src/models/**

# Inclusiones opcionales para archivos de prueba
# Esto asegura que solo los archivos de prueba relevantes sean analizados
sonar.test.inclusions=**/*.test.ts,**/*.spec.ts

# Set branch
sonar.branch.name=BranchSonar

Using the following command:

sonar-scanner \
  -Dsonar.projectKey=cuentame-v2234-backend \
  -Dsonar.organization=test \
  -Dsonar.sources=src \
  -Dsonar.host.url=https://sonarcloud.io \
  -Dsonar.login= I'M HIDDING THIS

It works as expected when executed at the main branch, but when I switch to a different branch and change the branch inside the .properties file, the coverage isn’t reported, appears like:

Has anyone experienced this?
Am I’m missing something while trying to analyze a different branch?

Thank’s for your comments and answers

Hey there.

I think you’re facing a bug that was reported last month:

It only affects PRs with no lines of code that can be covered by tests (0 new lines)

A fix is scheduled for an upcoming hardening sprint.

Can you confirm if these issues are happening on PRs with 0 new lines?

Hello there!
Yes, that’s exactly what is happening in my project.

But, it happens to me when requesting analysis of certain branches as shown:

Then, I guess we’re waiting for the bug to be fixed, thanks for your time and answer.

Hey @Alejandro_Castaneda

This issue has been fixed. :pray: