nedbat / coveragepy

The code coverage tool for Python
https://coverage.readthedocs.io
Apache License 2.0
3.03k stars 435 forks source link

Add skip_covered for xml report #1871

Closed NikTerentev closed 1 month ago

NikTerentev commented 1 month ago

I generate an xml report using coverage. After the project size increased, I started thinking about hiding 100 percent covered lines in this report. However, after studying the documentation, I found that hiding covered lines is only available for terminal output and HTML format. I have a question, why can't the same option be made for the xml format?

nedbat commented 1 month ago

The XML report is meant to be a data file used by something else to present information to a user. So it would always be complete, and the presentation program could have an option to filter the results. The HTML and text reports have the option because they are presentations. The JSON and lcov reports don't because they produces data files.

How are you looking at the XML report?

NikTerentev commented 1 month ago

Thanks for your answer, I agree with you. Then I will work on editing the presentation program to add hiding covered lines from xml.