Projects/export_findings returns issues for classes that were excluded

Must-share information (formatted with Markdown):
SonarQube: Enterprise Edition Version 9.2.4 (build 50792)
Sonar client:

I am running scan using client and using some classes exclusions after scan is finished if i open snapshot of scan results on sonarQube everything is fine and there are no classes that were excluded. But when i try to get the issues using api by projects/export_findings I am getting issues and in paths i see that classed that were excluded are also in the list. So it seems that export_findings just ignores what was excluded

Could you please recommend how can i get issues for the project so I am getting the same data that is reported in SonarQube web results.



Welcome to the community!

Could you expand on this, please? I’m not clear on what problem you’re having.


-Dsonar.exclusions option is set to exclude folders and files

It does exclude these if i check results on SonarQube, on the other hand if i call api projects/export_findings it returns results including some issues from excluded files



What’s the status of those issues? I assume they’re Closed?

Issues on those folders/files would have been moved to the Closed status at the first analysis after you set up the exclusions.

They’re still in the DB for now, and thus returned as part of the call. But they should be cleaned out in about 30 days.