Sonarqube scan doesn't assign automatically author for old code

I installed sonarqube locally on windows (community Edition Version 9.9.3, build 79811) with scanner version 6.2.1
I cloned git repo, and committed dummy code so it will be considered as code smell. After the scan, I saw the new code smell with the commit details, and also that it automatically assigned to me. Afterward I wanted to tested it as well on old code, so I’ve found code smell from 3 months ago, and asked the developer to login to the sonar server so he will be authenticate. I triggered new scan, but this time the code smell wasn’t assign automatically to him. any idea why?

Hi,

That old Code Smell would have been detected by the first analysis and created in SonarQube at that time. If you were to delete the project and re-run the first analysis, it would re-detect that 3-month-old issue and assign it to the developer.

 
HTH,
Ann

Tnx for the response. So in case it works, the assumption is that for supporting automatic blamer for old code, the user must first login and authenticate to the sonar server, and only afterwards create/recreate the project and run the scan?

Hi,

Yes. Alternately, you can assign the issues after project creation, although that’s going to be a very manual process.

 
Ann

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.