Skip to content

reports are added to output only if thresholds are specified #140

@subham-bdwaj

Description

@subham-bdwaj

Before releasing this PR - #111

Coverage reports were reported without mentioning project wide file, pkg thresholds. We had workflow setup with the previous functionality.

profile: cover.out
local-prefix: "github.com/owner/service"

threshold:
  file: 0
  package: 0
  total: 10

override:
  - threshold: 90
    path: ^internal/pkg/third_party$
  - threshold: 75
    path: pkg/file.go

This used to report to us when these specific overrides failed.

But after the above mentioned PR was merged, our reports only had total coverage reports since we had 0 thresholds for project wide file and package thresholds. Our workflows started failing and we couldn't understand why from the reports since they were not reported.

Can we keep another config in the .yml file to switch between the two implementations as needed?

Reason: Its not possible in some older projects/code to have overall pkg and file thresholds and adding override = 0 for each of the files becomes tough to manage and takes away a lot of flexibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions