File Exclusion/Inclusion problems

Template for a good new topic, formatted with Markdown:

  • ALM used Azure DevOps
  • CI system used Azure DevOps
  • Languages of the repository - VB.NET / C#
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    The file exclusions aren’t working the way I would expect for a mono repo. I’ve tried multiple file exclusion strings but don’t have it working correctly. In addition, I believe i have a large section of code that is not being scanned at all that should be.

I have a monorepo (configured per documented guildelines) with 31 individual projects. Almost all of them include a BusinessLogic dependency. therefore i only want that dependency scanned as part of our largest project, and skipped for all others. the Gold Business Logic is the folder that i would like to exclude. i’ll repeat this in all projects except one

here’s a screenshot showing that the Gold Business Logic folder is being scanned, even with the exclusion

at the same time, i would like the files to be scanned from this project, which has no exclusions on the Gold Business Logic folder, and yet, sonarcloud is choosing to skip it entirely

Source File Exclusions are the only configured exclusions for any of my projects so i know it’s not another type of exclusion that is the cause of the issue.
I also see this folder underneath Gold Business Logic that i would like to exclude from scanning since it is generated code.
What would be the appropriate entry in Source Exclusions to ignore this folder?

This StackOverFlow post is so remarkably similar I wonder if it’s someone from your organization a few years ago.

Just ran into this to. You can use the ? wildcard in the name of the folder. ? means any 1 character, so it will resolve the space.


awesome i will give it a shot! I didn’t consider the spaces existing as being a potential issue. Thanks!