How to ignore a directory while searching for the coverage report?

Community Edition Version 10.0 (build 68432)
SonarScanner 4.8.0.2856

  • how is SonarQube deployed: Docker

I’m trying to reduce the time sonar-scanner spends on searching for the coverage report.

I have a directory named data/ which contains a lot of small files, which makes sonar-scanner to spend a lot of time on:

13:02:51.854 DEBUG: Using pattern 'coverage.xml' to find reports
...
13:07:51.570 DEBUG: Using pattern 'xunit-reports/xunit-result-*.xml' to find reports

I’ve tried sonar.exclusions, .gitignore but it’s still searching for the report on that directory.

When I remove the data/ directory, the process takes less than 20 seconds, but I want to keep it there.

1 Like

This is the second post about this step taking a long time.

So I will flag this for experts :slight_smile:

Hi @riless,

Thank you for reaching out and sorry for the late reply.

You are correct about the sonar.exclusions, it will only exclude files for the analysis but we still need to search in the excluded files for coverage reports.
I am trying to figure out if the slowness is only linked to the coverage search or also the whole scanner itself.
Would you be able to provide the full debug log of the scanner, as well as the JDK version you are using? This would help us pinpoint the issue.
Also, do you have a rough idea of the number of files in your data folder?

Thank you

David

Hi @riless,

We have created a ticket that may help with the lookup of the coverage files. Still, it would be good to have more information to see if the scope of the issue is broader than the one covered in the ticket.

You can find the ticket here.

Thank you.

David