Steps to reproduce:
- analyze master as a long living branch
- create a branch feature/common, and analyze it as a PR: -Dsonar.pullrequest.key=common_on_master -Dsonar.pullrequest.base=master -Dsonar.pullrequest.branch=feature/common
- create a branch feature/short, and analyze it as a PR: -Dsonar.pullrequest.key=pr_on_pr -Dsonar.pullrequest.base=feature/common -Dsonar.pullrequest.branch=feature/short
In debug logs, you'll see:
The analysis will not fail, but the PR will be analyzed like if it was a new project (using global settings and default quality profile). This may ends up with unrelated issues.
For a PR analysis, there is a confusion on scanner side between:
- the base branch of the PR from an ALM point of view (sometimes also called target) that we will use to determine changed files/lines
- the long living branch SQ analysis we will use as a reference to load settings/quality profiles and later do issue tracking.