How to make Sonar ignore some classes for codeCoverage metric?

后端 未结 8 1958
花落未央
花落未央 2020-12-08 09:18

I have a Sonar profile in Maven. Everything works fine except the code coverage metric. I want to make Sonar ignore some classes only for the code coverage metric. I have th

8条回答
  •  旧时难觅i
    2020-12-08 09:44

    When using sonar-scanner for swift, use sonar.coverage.exclusions in your sonar-project.properties to exclude any file for only code coverage. If you want to exclude files from analysis as well, you can use sonar.exclusions. This has worked for me in swift

    sonar.coverage.exclusions=**/*ViewController.swift,**/*Cell.swift,**/*View.swift
    

提交回复
热议问题