We are maintaining a quite large code base (2M+ LOC) which is organised in a gradle multi-module project with ~40 modules. There are individual responsibilities for some modules tied to one or a couple of colleagues. Which is the reason, that we used the SonarQube support for modules quite heavily - until it was dropped in release 7.6. Well, as an SonarQube-Advocate in our organisation, I’d like to recommend some replacement and came to the “directory search”. But in my opinion the directory search doesn’t behave like one could expect.
When I initially open the directory , I see 15 directories sorted descending by the number of issues within these directores, which is fine for me:
But when I try to search for a specific directory, there is apparently no sorting and I don’t see actually what I’m looking for - the directories with the most issues:
Why are the directories with the most issues not shown anymore?
Why can’t I sort this by the number of issues in a folder? Maybe that could bring up the folders with the most issues?
Why are now “30 of 41 shown”? I would have expected many more directories in total - not only 41! And I would have expected only 15 to be shown initially!
Why are all the directories shown having no single issue? Searching for directories in this view, I’m only interested in directories containing issues!
Why are the directories with the most issues, containing my search string, are not shown at all anymore - even if I click on “Show More”:
I’m aware of Jira, which would be a quite good replacement for the former modules, but even then, I would expect the following in the directory search:
There should be a possibility to hide directories without issues.
Really all directories containing the search string should be presented - maybe initially only 15, but with the possibility to expand to all or to a maximum number (maybe 100) of search results.
The search result should be ordered descending by the number of issues, or it should be possible to set the sort order based on the number if issues whithin a directory.
The user should be able to define whether the search string is applied on a complete directory name or if partial matches should be presented too.
Coming back to my initial problem - the dropped support for modules in SonarQube, I have one more question: Is anyone aware of a plugin implementing the module support?
Just to prevent a misleading impression: I’m very fond of SonarQube and of the integration of SonarQube in our build process and in our IDE. I just would like to have some support for modules and I appreciate any support on this topic.
I’m taking a look on the ticket “SONAR-12771” from time to time, and I noticed, that it was post-poned several times and currently there is no “Fix Version” set at all.
Is there a chance, that the ticket will be implemented in the foreseeable future?
are there any news on [SONAR-12771] - Jira? We are using now SonarQube 9.9, but that ticket obviously hasn’t been resolved. We still would appreciate the features requested in that ticket.
Or would you recommend to find a solution by using the REST API of the SonarQube server?
We are currently considering removing the feature that allows searching issues by directory. Upon reflection, we believe this feature may not be addressing a significant user need. It seems it was initially implemented more because it was feasible than in response to a specific user requirement.
What are you trying to achieve by querying issues by directory?
How do you plan to use the data if you manage to get what you need?
as described in my inital post, the modules feature of SonarQube, which was dropped in release 7.6, was used by our teams to quickly find the SonarQube issues they are responsible for. And in addition, we tried to build some statistics based on the issues per module in order to find a way to evaluate how good the teams proceed with removing the issues over time.
When the support for modules was dropped in SonarQube 7.6, we tried to us the directory search, as the module structure in our code is reflected in the package structure. That was when we discovered, that the directory search did not work as we expected it.
Without this feature, I don’t see a way to have an overview how many and which tickets are related to a module in our software.
Of course, at the moment each issue is assigned automatically to a developer based on Git Blame and this works quite good. So if you are removing this feature, only a kind of overview for the management is not possible anymore.
To take advantage of it, you should analyze only a subset of your big git repo separately and then you group these projects together into an Application.
This way, your developers focus only on the projects and the code where they can have an impact.
Managers look at the data at the Application level.
I haven’t been aware of the Application feature, but it sounds interesting to us. Unfortunately we are using the Community Edition of SonarQube, so at the moment, this feature is not available for us. Well, guess I have to convince our management, that we at least should get the Developer Edition.
One of our sales representatives can help explain to your team the benefits of moving to a commercial edition. We are happy to help with questions and give you an evaluation, no strings attached. Please tell us about yourself so we can put you in touch with the right team.
Thank you and look forward to discuss with you!
Best regards,
Evelyn