We have a project setup along the lines of Project A consisting of folders A_A and A_B; A_A is the main app folder, A_B is a static library that gets built & scanned in the context of project A.
When a commit generates (for example) one issue in A_A and 133 issues in A_B the new issues e-mail I receive (as an administrator for that project) will only list one issue for the author - skipping the other 133. The same happens for the âmy new issuesâ notification e-mail the author receives.
From what Iâve investigated, this seems to be a case of:
either the separate folder isnât taken into consideration, in which case it should
alternatively, I see that the e-mail link ends in createdAt=2022-09-30T19%3A39%3A40-0400 - which points to a very specific time and it might just be the case that, because of processing delays, the other issues have a slightly different time
Can you please confirm whether this behavior is intended, buggy or if it might be an issue with our configuration?
Are you subscribed to âNew issuesâ or âMy new issuesâ on the project? Because your âMy Issuesâ notification should be the issues that are raised on lines where youâre the last committer.
On the other hand, if your subscription is to âNew issuesâ then I would ask if the issues are ânewâ (raised in the New Code period) or not.
Iâm the instance administrator and I subscribe to all new issues on said project. My coworker who triggered the large number of issues is only subscribed to his new issues. No other commits occurred there during that day so all of the issues were his - yet we both got the issue count only for one folder, not for the second.
Were the âmissingâ issues considered new by SonarQube? That is, were they raised as ânewâ issues in the New Code Period? Did they show up on the New Code tab of the project homepage?
Yes, I havenât checked each and every one but I did check a couple and they were marked as new code. They were also pulled by an automated script via API.
We were running SonarQube 9.6.1.59531, I just upgraded to 9.7.0.61563 before I received the notification on your reply
Itâs called via command line; build-wrapper is called with the main project Makefile as an argument (make -f project_name/Makefile) - which will also build and statically link sources from folders a,b,c,d - and then sonar-scanner with the following config (heavily redacted, Iâm afraid, but I did leave all the configuration keys in place):
sonar.projectKey=project_name #REDACTED
# --- optional properties ---
# defaults to project key
#sonar.projectName=My project
# defaults to 'not provided'
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=project_name,a,b,c,d #REDACTED
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.host.url=http://sonarqube.server:9000
sonar.login=<token_id>
sonar.scm.provider=svn
sonar.svn.username=<username> #REDACTED
sonar.svn.password.secured=<password> #REDACTED
sonar.branch.name=master
sonar.cfamily.build-wrapper-output=project_name/sonar_build_output
sonar.working.directory=project_name/sonar_working
sonar.cfamily.threads=4
Code smells and bugs, there might have been one or two hotspots but the main issue is a large number of code smells passed under the radar
Yes, theyâre all in OPEN status; some time later they are moved to CONFIRMED by a separate script - think a matter of days, not minutes
One thing I have in mind is that, for this project, I initially only scanned the main folder (so the project included only the files under project_name without having the project_name folder under the code tab) then modified the sonar-project.properties file to include all the separate folders (so the project would now list under code folders project_name,a,b,c,d) - could this have messed up some internal references? Would there be any point in recreating the project? (Iâd rather not in order to keep history intact but I can do it if itâs necessary)
Also, there are 20+ folders in the sonar.sources list - could the number be too high?
For some reason the notifications now seem to be working correctly after upgrading to 9.7 - I was able to confirm correct functionality for two days in a row.