hi, when i run mvn sonar:sonar, i found it always show " Coverage on 0 New Lines to cover" in new code Tab, why this happen?
you can see the the coverage on new line is 0,but it detect 163 lines for change indeed.
this is my script for run:
#!/bin/bash
set -e
export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH"
export JAVA_HOME=/opt/homebrew/opt/openjdk@11
SONAR_OPTS="$SONAR_OPTS -Dsonar.host.url=xxxx"
SONAR_OPTS="$SONAR_OPTS -Dsonar.issuesReport.html.enable=true"
SONAR_OPTS="$SONAR_OPTS -Dsonar.projectKey=channel-vcc"
SONAR_OPTS="$SONAR_OPTS -Dsonar.branch.name=dev_IPL-17183"
SONAR_OPTS="$SONAR_OPTS -Dsonar.newCode.referenceBranch=develop"
#SONAR_OPTS="$SONAR_OPTS -Dsonar.pullrequest.branch=feature/IPL-17183-test-cicd"
#SONAR_OPTS="$SONAR_OPTS -Dsonar.pullrequest.base=develop"
SONAR_OPTS="$SONAR_OPTS -Dsonar.qualitygate.wait=true"
#SONAR_OPTS="$SONAR_OPTS -Dsonar.pullrequest.key=48"
SONAR_OPTS="$SONAR_OPTS -Dsonar.scm.forceReloadAll=true"
SONAR_OPTS="$SONAR_OPTS -Dsonar.coverage.jacoco.xmlReportPaths=${PWD}/channel-vcc-jacoco/target/site/jacoco-aggregate/jacoco.xml"
echo "the sonar option is $SONAR_OPTS"
SONAR_OPTS="$SONAR_OPTS -Dsonar.login=xxxx"
mvn clean package verify
mvn -e -X --batch-mode sonar:sonar $SONAR_OPTS
any wrong ?