feedback
feedback copied to clipboard
Status badge color does not respect configuration
Describe the bug
The color of the status badge does not respect configuration in .codecov.yaml
To Reproduce We are using Codecov for an open-source project. The color range is configured as follows:
coverage:
range: 70...90
Our .codecov.yaml file can be found at https://github.com/klee/klee/blob/master/.codecov.yml and was validated via https://codecov.io/validate
With 70% coverage (70.21% more precisely at the moment), I would expect the badge color to be yellow, but it is red:
What is the problem? Thank you.
@ccadar I'm confused here, 70% is the low range for coverage and so should be red.
@thomasrockhu-codecov thanks for the response. According to https://docs.codecov.com/docs/coverage-configuration
range: 70...90 means that when the coverage was between 70% and 90% (it was 70.21% when I reported this) we should have seen a yellow bar, not a red one. Is the documentation wrong then, or am I reading it incorrectly?
Hi @ccadar, it seems this is a documentation mishap, it's true that in the UI those bars would show up as yellow as soon as it's above the range. The badge behaves differently by gradually changing the colour across the range.
I mentioned it seems like a documentation mishap, but I'm curious to know which behaviour you prefer? I think we can make the behaviour of the badge match the behaviour of the UI and put that behind a config option.
Sorry for the late reply here. I think a configuration option would be best. But at the very least, the current behavior should be documented -- in my case, I thought the color change happens at the threshold rather than gradually, which is why I opened this issue. Thanks again!