Hi,
We are using Git, hosted on Azure Devops, that has CI pipelines with SonarQube analysis integrated. I am seeing that on stale branches, there seems to be some issues. Our setup is simple enough, with master being a Main branch and feature branches being short-lived branches in SonarQube.
The scenario:
- A feature branch is created off commit 12345 on master, call the feature feature/myFeature
- master has 10 commits done on it from other PR’s. feature/myFeature has no commits during this time.
- feature/myFeature becomes active again and has a couple commits, and a subsequent pull request created.
I am seeing that on analysis of feature/myFeature, issues are raised on code that is different compared to the current state of master. However, it’s my understanding that only new code in the commits of feature/myFeature should be analyzed. It is like SonarQube is comparing the branch to the current master, instead of the branch point, commit 12345. Am I thinking about this the right way?
We are using SonarQube 7.9 LTS installed on an on-prem server. The analysis occurs on a different server, which talks to Azure Devops, which talks SonarQube.