-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Describe the context
- Extension: BuildQualityChecks
- Environment: Azure DevOps Services (cloud)
- Pipeline type: yaml
Describe the problem and expected behavior
C code coverage analyzer makes an average for the entire project.
The expectation is that each file is over the required limits across the project.
E.g. for a good project where current coverage is 90%, adding a few small files with 0% coverage will result in a passing CI gate (reducing the coverage to let's say 80%).
The problem this creates is that new files must now have more coverage than expected.
Example from our https://github.com/Azure/azure-sdk-for-c repo:
Our yaml is:
- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@6
displayName: Check line coverage
inputs:
checkCoverage: true
coverageFailOption: fixed
coverageType: line
# 90% minimum line coverage
coverageThreshold: 90
condition: eq(variables['AZ_SDK_CODE_COV'], 1)
- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@6
displayName: Check branch coverage
inputs:
checkCoverage: true
coverageFailOption: fixed
coverageType: branch
# 70% minimum branch coverage
coverageThreshold: 70
condition: eq(variables['AZ_SDK_CODE_COV'], 1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
