mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The current implementation of ``sphinx.ext.coverage`` outputs which methods,classes, and functions are documented. This commit adds a short summary of this report in terms of ``documented objects / total number of objects``, both per module and total. The purpose of this is to support a currently not mainstream but relevant use-case: a coverage report on the number of objects that are documented. By having the statistics on the report or on the stdout, a regex expression can capture the coverage percentage (e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``) and use it e.g. in another report, a status badge, etc. Two options were added to the configuration to allow a table to be printed in the report and/or to stdout. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>