Skip to content

rustdoc: --show-coverage should show per-item, not per-file #75254

Open
@jyn514

Description

@jyn514

Currently, --show-coverage looks like this:

+-------------------------------------+------------+------------+------------+
| File                                | Documented |      Total | Percentage |
+-------------------------------------+------------+------------+------------+
| ...target-lexicon-0.10.0/src/lib.rs |          1 |          1 |     100.0% |
| ...exicon-0.10.0/src/parse_error.rs |          1 |          7 |      14.3% |
| ...et-lexicon-0.10.0/src/targets.rs |          9 |        154 |       5.8% |
| ...get-lexicon-0.10.0/src/triple.rs |         13 |         18 |      72.2% |
| ...con-03b8c8c76fdbfbc7/out/host.rs |          1 |          1 |     100.0% |
+-------------------------------------+------------+------------+------------+
| Total                               |         25 |        181 |      13.8% |
+-------------------------------------+------------+------------+------------+

However, this isn't particularly helpful to the crate author - they know some docs are missing, but not which ones. So it's hard to add the missing docs. It would be great if instead rustdoc showed this info per-item instead of per-file so you could tell which items were missing docs.

Originally reported in rust-lang/docs.rs#939 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doc-coverageArea: Calculating how much of a crate has documentationC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions