Exclusions dont see to be working

I want to ignore anything (folders or files) inside the css/less folder but its not being ignored

I have the following set on azure devops pipeline build

  • task: SonarCloudPrepare@1
    displayName: ‘Prepare SonarCloud’
    SonarCloud: ‘SonarCloud’
    organization: xxx
    scannerMode: ‘MSBuild’
    projectKey: xxx
    projectName: xxx
    exclusions: ‘/css/less//*’

In the debug output I can see this:
13:52:07.666 INFO: Excluded sources for coverage: /css/less//*

yet I can see the below and its including everything in the less folder when I look at “Code” in Sonarcloud
(also why are the slashes in both directions below?)

13:52:15.564 DEBUG: ‘CISIWeb2/css/less/kendo/web/kendo.bootstrap.mobile.css’ generated metadata with charset ‘UTF-8’
13:52:15.564 DEBUG: ‘CISIWeb2\css\less\kendo\web\kendo.bootstrap.mobile.css’ indexed with language ‘css’

OK worked it out as below:

- task: SonarCloudPrepare@1
  displayName: 'Prepare SonarCloud'
    SonarCloud: 'SonarCloud'
    scannerMode: 'MSBuild'
    projectKey: xxx
    projectName: xxx
    extraProperties: sonar.exclusions=**/css/less/**/*

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