Support “Focus on New Code” in Connected Mode when New Code Definition is “Reference branch”

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.

Thanks,
Dustin McKie

Hi Dustin,

Welcome to the community and thanks for this report!

Can you give your context for this? I.e. which IDE flavor and version?

 
Thx,
Ann

Hi Ann,

I’m using VS Code v1.109.5 and SonarQube for IDE v4.43.0.

Thanks,
Dustin

Hi Dustin,

Thanks for verifying that you’re on a current version. I’ve flagged this for the experts.

 
Ann

Hi Ann,

Wanted to quickly check in to ensure this hasn’t gotten lost.

Thanks,
Dustin

Hi Dustin,

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.

 
Ann

Hi @dbmckie,

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.

We will keep you updated if anything changes.

Best regards,
Farah