Newcode period in the project settings

SonarQube Version: Enterprise Edition Version 10.3

Hello,

We set the newcode period for all projects to the “Reference Branch” of the master, and for the master, we set the “specific Analysis” to a specific date.

However, we don’t find a “specific analysis” setting in Sonarqube version 10.3.

Could you please let us know how can we set the specific analysis for all the projects?

Thanks.

Hi,

the doc
https://docs.sonarsource.com/sonarqube/10.3/project-administration/clean-as-you-code-settings/defining-new-code/ has

Specific analysis (Web API only): Choose a previous analysis as your new code definition. Any changes made since that analysis are considered new code. For more compliance with the Clean as You Code methodology, this option cannot be set in the UI, as it would require frequent user action to be kept up to date. Available:

  • at the branch level in Developer Edition

  • and above

  • at the project level in Community Edition, as the edition doesn’t support multiple branches

means you have to use api/new_code_periods/set with type SPECIFIC_ANALYSIS.

You should update to the latest version Sonarqube 10.5.1, as only the LTS and the latest version are supported.

Gilbert