1

I am new to sonarqube and I don't understand how it works. I have downloaded the latest sonarqube image, I run a simple container and the application starts, everything ok. Community Edition Version 9.9

I have a simple python program and I scan it with the following command: sonar-scanner.bat -D"sonar.projectKey=test" -D"sonar.host.url=http://localhost:9000" -D"sonar.login=MY_TOKEN" -D"sonar.python.version=3"

In the first scan the new code tab contains no information and in the overall tab everything is perfect, without any error.

I enter 1 smell code and launch the scan. The new code tab shows 1 smell code and the overall tab shows the same information. I think that everything is correct.

I enter another smell code and launch another scan. The new code tab shows 2 smell codes and the overall tab shows the same information.

If it shows the same information, what is the difference between them? Shouldn't the second scan show only 1 smell code in new code tab and 2 smell code in overall code tab, why doesn't it happen like that? Why is the scan not done against the latest version?

thank you in advance

Manu
  • 81
  • 1
  • 3

1 Answers1

1

You can configure in SonarQube your new code period on the admin pages. It is possible to define from last analysis, for a number of days or from a specific analysis. You need to have a look what is configured on your instance.

For futher defails see in the documentation New code definitions.

milbrandt
  • 1,438
  • 2
  • 15
  • 20