Sonarcloud will ignore exclude files from coverage exclusions

I have this pattern defined to exclude some [schedule-mockdata.txt
mock data when analyzing duplicates:


Sonarcloud is not excluding this file:


Also, I am attaching the file that is being flagged as having duplicates. This is mock data and each object is different… is not clear to me why these are being flagged.


|attachment](upload://oox2hxKjmDqGWwZjNK0zb1lcmYH.txt) (16.5 KB)

Hi @pedro_quintero and welcome to the community!

Do you still have this issue?

I do…



Can you define more precisely your intent please?
The title is about coverage exclusions which is different from the duplication exclusions you are referring in the content of your message.
Which part doesn’t work well for you?
You have two separate fields to set these different types of exclusions in your analysis scope settings.

If I look at your project I can see 0 duplicate so I guess the duplication exclusion works. I think you are referring to the coverage exclusion. You may want to add this file in the coverage exclusion field as well.


Hi Vincent,

Thanks for your reply. I apologize, I meant duplication exclusions, and I really have TWO problems: 1. same as you, I don’t understand why Sonar is flagging duplications in that file. Then I said, ok I will just exclude any mockup data
from the duplication coverage. But that doesn’t seem to be working. I am attaching a screenshot of the settings to give you more context.

Thank you for your reply.