Operating system: Windows 10
IDE name and flavor/env: SonarQube For IDE - VS Code
Hello,
I would like to request “Focus on New Code” support for Connected Mode projects where (at the project level) the New Code Definition is configured as “Reference branch.”
Today, the SonarQube server reports new code issues relative to the reference branch, but when I enable “focus on new code” in the IDE those new-code issues are not reflected/filtered the same way, if at all.
The only reference I have been able to find on this topic is from this page stating,
The Reference branch new code definition is not supported. Please see the New code definition options article above for links to learn how to properly set your new code definition on the server.
I have been unable to find any further information nor recommendations on how to proceed since “Reference branch” is the recommended definition for teams using feature branches.
This inconsistency between the SonarQube server and the IDE makes it difficult to quickly review which issues are new versus existing.
It looks like we don’t support reference branch in the IDE, so it’s been flagged for the PMs to cogitate on whether that should change. Hopefully they’ll be along soon. And I can only apologize that you didn’t get a more timely update on that.
I reiterate on my colleague Ann apologies for not answering earlier.
Indeed, we don’t support new code reference branch in the IDE because of it’s technical complexity. Reference-branch new code depends on accurate SCM diffing, and when that isn’t available, fallback server-side approximations can produce incorrect “new code”.
It is not in our roadmap for the time being. However, your adds weight to the importance of this capability and we’ve added it to the feature request for future prioritization.