Excluding a file from SonarCloud analysis

Hi, I want to exclude a couple of files from the SonarCloud analysis as they are generated from protobufs and are immutable while containing a lot of code smells. At first I decided to create a sonar-project.properties file in which to specify the exclusions but the following answer made me think that was an outdated approach. I tried following the steps to reach the UI screen that controls exclusions but in my project under “Administration” I only have “Quality Gate” and “Quality Profiles”

Is there a way to exclude files without using the sonar-project.properties approach?

1 Like

Hey there.

It seems you have Administer Quality Profiles and Administer Quality Gates permission at an organization-level, but don’t have Administer permission on this specifc project.

I think it would make sense for you to ask your organization admin, or a project administrator, about permissions on this project.

Here’s the documentation for user permissions in SonarCloud.

Once you have the right permissions, you can set exclusions through the UI. For what it’s worth, I think everyone has a different opinion on which is better – storing the configuration in the repo version controlled, or setting it in the UI.