Skip to content

Fix coverage threshold ignored for Total line in Summary #11571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2022
Merged

Fix coverage threshold ignored for Total line in Summary #11571

merged 1 commit into from
Jan 15, 2022

Conversation

sh41
Copy link
Contributor

@sh41 sh41 commented Jan 15, 2022

An incorrect variable is being passed to the display/2 function on line 353 for the Total line in the coverage summary report. The result is that that Total line will always display in red no matter what the threshold is set to.

The correct threshold value is retrieved on line 348 from the opts or the default and is used on line 351 for the body of the summary report. The final call to display then reverts to using the opts variable which is incorrect.

I have been unable to capture the color of text in the summary report in a test, so have been unable to write a test for this change.

An incorrect variable is being passed to the `display/2` function on line 353 for the Total line in the coverage summary report. The result is that that Total line will always display in red no matter what the threshold is set to. 

The correct threshold value is retrieved on line 348 from the `opts` or the default and is used on line 351 for the body of the summary report. The final call to display then reverts to using the `opts` variable which is incorrect. 

I have been unable to capture the color of text in the summary report in a test, so have been unable to write a test for this change.
@josevalim josevalim merged commit 7b0d4d6 into elixir-lang:main Jan 15, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@sh41 sh41 deleted the patch-1 branch January 15, 2022 14:31
josevalim pushed a commit that referenced this pull request Feb 3, 2022
An incorrect variable is being passed to the `display/2` function on line 353 for the Total line in the coverage summary report. The result is that that Total line will always display in red no matter what the threshold is set to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants