New code
SonarQube for Visual Studio does not offer a Focus on new code mechanism at this time. The issues you see in the IDE represent all issues found in overall code. See the SonarQube Server and SonarQube Cloud pages on Quality standards for new code.
To learn more about the Focus on new code feature in SonarQube for IDE, check the New code pages in the other IDEs:
New code and your quality standards
Focusing on new code is an important step in getting the most out of SonarQube. When you run an analysis on the server of your main branch (or other long-lived branches), SonarQube Server differentiates the analysis results of new code from overall code (overall code includes new and old code). This allows you to focus your analysis evaluation on newly introduced issues and apply quality standards. Focusing on new code is at the core of implementing the SonarQube strategy, knowing that the other code will be incrementally fixed over time.
Your new code definition
SonarQube for Visual Studio always displays all the issues found in your file, independent of the new code definition (NCD) defined on the server.
New code definition options
When you use the NCD found in the SonarQube Server or SonarQube Cloud quality profile, you have more opportunities to choose how to define new code. Check out their respective pages for details.
How the new code definition affects the analysis results
SonarQube Server, SonarQube Cloud, and SonarQube Community Build use your NCD as a baseline for code comparison to identify new code by only showing you issues found in new code.
Focusing on new code and understanding how to work with new code to apply your quality standards are only applicable in SonarQube Server, SonarQube Cloud, and SonarQube Community Build.
Was this page helpful?