Warning: Specifying module-relative paths at project level in the property 'sonar.exclusions' is deprecated

(Max) #1

While analyzing a .net core project with an embedded Angular SPA in an Azure DevOps build (with MSBuild), I see the following warning in the project on Sonarcloud:

Specifying module-relative paths at project level in the property ‘sonar.exclusions’ is deprecated. To continue matching files like ‘BFF/01.src/Platform.BFF/wwwroot/favicon.ico’, update this property so that patterns refer to project-relative paths.

The sonar.exclusions looks as follows:

sonar.exclusions=ClientApp/node_modules/**/*,ClientApp/e2e/**/*,ClientApp/**/*.spec.ts,wwwroot/**/*,ClientApp/obj/**/*,ClientApp/bin/**/*,ClientApp/projects/**/*,ClientApp/dist/**/*,ClientApp/db/**/*,ClientApp/coverage/**/*

All of those paths are relative to the follow sonar.projectBaseDir:

sonar.projectBaseDir=D:\a\1\s\BFF\01.src\Platform.BFF

I am looking for a solution on how to resolve the warning. Also, I do not fully understand the difference between ‘project-relative paths’ and ‘module-relative paths’. Is there anyone who has come across this warning and knows how to resolve it?

Thank you.

(Max) #2

Anyone any idea?