sonar-cnes-report icon indicating copy to clipboard operation
sonar-cnes-report copied to clipboard

I got the WARNING "[WARNING] There are more than 10000 issues to export, but SonarQube is not able to provide all issues. Only the 10000 first issues are reported. Please, reduce the number of issues before retrying to export." is there an argument which can be used to filter the issues by category severities

Open keerthanacns opened this issue 3 years ago • 4 comments

Hi Team,

I have used the sonar-cnes-report.jar and I am able to generate the reports. But the issue I am facing is, in the sonar dashboard I could see 13K issues but while exporting the report, I am getting the below warning: [WARNING] There are more than 10000 issues to export, but SonarQube is not able to provide all issues. Only the 10000 first issues are reported. Please, reduce the number of issues before retrying to export.

Is there a way to pass an argument as a filter query, such as filtering based on severities and thus reducing the number of issues less than 10K which is the export limit. Somewhat like below: java -jar sonar-cnes-report-3.2.2.jar -t -s -p --filter serverities=MAJOR

Or is there a feature to export separate reports based on number of issues. For example if i pass 7000 as the count and if I have 13K issues in total, then it should generate 2 separate reports: first one having 7K issues and 2nd report having rest of the issues(6K)

keerthanacns avatar Jan 07 '21 11:01 keerthanacns

Hi @keerthanacns

Thanks for your feedback, we appreciate it ! There is no way to select only a specific severity, as the tool is intended to produce a complete report of your project's quality status. And right now, there is also no way to generate a report on a subset of a SonarQube project, for the exact same reason.

Your issue is due to the fact that we try to get all issues at once, and there you hit the SonarQube limit for a single request. We could improve that part by using SonarQube issues pagination to get all of them in multiple requests automatically if needed. Unfortunately, I can't make any promises on when we would be able to work on this...

Sancretor avatar Jan 11 '21 08:01 Sancretor

After some research, it appears to be an internal limitation of SonarQube server. We cannot fix by using pagination as this is already used for the issues search, and SonarQube will just refuse to give any more issues after 10000. We could try to use some criteria to reduce the search results number, but it's impossible to predict which one or which ones will be enough to receive less than 10K issues. Also, there might be an "unlikely but not impossible" situation where any combination would lead to more than 10K issues, so no solution to generate the report. Trying to determine this dynamically may be painful and lead to a huge number of useless requests to the server APIs, because of the number of filters available.

It may not be a good idea to implement this in the end.

Sancretor avatar Jan 26 '22 09:01 Sancretor

Hi, I'm facing same issue. I have got project team who want to plan reduction of technical debt with help of excel/csv files. I'm using Sonar API and parameters to filter and get complete export. So that's why I'm interesting to apply filter by severties. Include INFO and upper by default, and in specific case, got selector to export only critical / major+ / minor+ issues. It will not cover 100% of the problem but we will resolve technical debt by priority level. :)

Silicoman avatar Jun 17 '22 14:06 Silicoman

Hi @Silicoman Thanks for the feedback ! What you need seems very specific, and like I said before, creating that kind of generic feature might be hard... We would have to create a whole dynamic filtering option for issues, only for users with more than 10 000 issues. We'll have to talk about it ... not sure to implement such a feature, at least not soon.

Sancretor avatar Jun 22 '22 14:06 Sancretor