Anyway to reference a sonar.coverage.exclusions file


We have a fairly length sonar.coverage.exclusions list that we currently manage through the gui, but we’d like to move it into our build steps in Azure Devops so we can version control it. eg.

  • task: SonarCloudPrepare@1
    SonarCloud: ‘Sonarise’
    organization: ‘thisone’
    scannerMode: ‘CLI’
    configMode: ‘manual’
    cliProjectKey: ‘testing’
    cliSources: blah
    extraProperties: |
    sonar.coverage.exclusions= ,,

Is there any way for the sonar.coverage exclusions to reference a file, or even to have it as a list rather than a very very long line?


Hi @andrew1

This is not currently possible.

Out of curiosity, which kind of project / exclusions do you have to have such a long list ?

Thank you.



It’s generally projects that are in the first stages of being developed, or old code bases.