Exclude auto generated files in SonarQube

Hi, I’m new to SonarQube and I’m trying to perform an analysis of an Asp.Net project.

Inside my solutions there are many auto-generated files that I want to exclude from the analysis. They are distributed in different projects and folders. The only peculiar feature to recognize these files is that they start with //This is an auto-generated file

Is there any way to create a filter to exclude them?

Hey there.

SonarQube’s .NET analysis autodetects auto-generated code, although the presence of:

//This is an auto-generated file

Would not trigger it. Although it’s really close.

While this is not customizable, I can’t help but think auto-generated file would be a good pattern to add. I’ll send this over to our dev team and see what they have to think.

Can you please also specify:

  • What version of SonarQube you’re using?
  • What tool is auto-generating these files?