Is it possible that can be achieved if I switched to PR analysis mode? I can see that some commands may help, such as “sonar.pullrequest.base”, not sure if they are applicable?
As the former way to do that via property sonar.branch.target has vanished with Sonarqube 8 it’s only possible to set this with the web api or via web ui, the default new code setting for a branch is previous version
Otherwise when using PR analysis which is activated with properties sonar.pullrequest.key, sonar.pullrequest.branch, sonar.pullrequest.base
the new code is defined by branch and base.
see Pull Request Analysis | SonarQube Docs