Coverage Exclusion doesn't work

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Version 8.4.2 (build 36762)
  • what are you trying to achieve
    Trying to exclude a folder using code exclusion in code analysis.
  • what have you tried so far to achieve this
    So my code looks like this:

I’m trying exclude the SimpleBrowser folder in code exclusion.

Sofar I’ve tested various combination of: SimpleBrowser with *, and / as prefix and suffixes but nothing works. SimpleBrowser is always there when I upload a new build to SonarQube.

What is the correct syntax to ignore the whole folder?

//Ben

Hi @BenY,

Welcome to the Community! :smiley:

The syntax for exclusions is here. What you’re probably after is

**/SimpleBrowser/**

Also, you mentioned Coverage Exclusions in the title but the body of your post sounds like you want to exclude the code itself from analysis. These are two separate configurations, sonar.coverage.exclusions and sonar.exclusions.

Regards,

Cameron.

I want to exclude code from the code analysis :slight_smile:. So I guess sonar.exclusions is correct?

I found it and it removed my folder from code analysis! Thanks!

:tada: Glad you got it configured correctly!

Regards,

Cameron.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.