I am trying to run sonar scan on local build using sonar maven plugin, it runs fine. Although I am running on specific branch, but the code smells it shows on the dashboard are always shown on master branch.
I have used the below in my pom.xml
org.sonarsource.scanner.maven
sonar-maven-plugin
3.3.0.603
verify
sonar
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.projectKey>XXXXXX</sonar.projectKey>
<sonar.organization>default-organization
</sonar.organization>
<sonar.host.url>
XXXXXX
</sonar.host.url>
<sonar.branch.name>feat/spot-bug_Sonar
</sonar.branch.name>
<sonar.branch.target>feat/spot-bug_Sonar
</sonar.branch.target>
<sonar.login>
XXXXXXX
</sonar.login>
it does not show any code smell on the branch where I am running the analysis.
Instead it shows the code smells(3) on master branch.![image|690x433]
(upload://tKWvUfDd3N57R7S4zQwaMpQAQSf.png)
INTELLIJ SCREENSHOT