Skip to content

rustdoc --show-coverage --output-format json missing many files #117291

Open
@Nemo157

Description

@Nemo157

I tried this code:

> cargo dl -e libnoise@=0.1.0
> cd libnoise-0.1.0
> cargo rustdoc -- -Zunstable-options --show-coverage
> cargo rustdoc -- -Zunstable-options --show-coverage --output-format json

I expected to see this happen: The same files in the json and human-readable table

Instead, this happened: Many more files in the table than the json

{
  "src/lib.rs": {
    "total": 1,
    "with_docs": 1,
    "total_examples": 1,
    "with_examples": 1
  },
  "src/prelude.rs": {
    "total": 1,
    "with_docs": 1,
    "total_examples": 1,
    "with_examples": 1
  }
}
+-------------------------------------+------------+------------+------------+------------+
| File                                | Documented | Percentage |   Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| src/core/adapters/abs.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/add.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/billow.rs         |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/blend.rs          |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/clamp.rs          |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/displace.rs       |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/exp.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/fbm.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/lambda.rs         |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/max.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/min.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/mul.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/neg.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/pow.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/power.rs          |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/product.rs        |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/ridgedmulti.rs    |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/rotate.rs         |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/scale.rs          |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/select.rs         |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/sum.rs            |          1 |     100.0% |          0 |       0.0% |
| src/core/adapters/translate.rs      |          1 |     100.0% |          0 |       0.0% |
| src/core/generator.rs               |         40 |     100.0% |         36 |     100.0% |
| src/core/source.rs                  |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/checkerboard.rs    |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/constant.rs        |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/custom.rs          |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/improved_perlin.rs |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/perlin.rs          |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/simplex.rs         |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/value.rs           |          1 |     100.0% |          1 |     100.0% |
| src/core/sources/worley.rs          |          1 |     100.0% |          1 |     100.0% |
| src/core/utils/noisebuf.rs          |          4 |     100.0% |          1 |     100.0% |
| src/core/utils/visualizer.rs        |          1 |     100.0% |          1 |     100.0% |
| src/lib.rs                          |          1 |     100.0% |          1 |     100.0% |
| src/prelude.rs                      |          1 |     100.0% |          1 |     100.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total                               |         78 |     100.0% |         49 |     100.0% |
+-------------------------------------+------------+------------+------------+------------+

Meta

rustdoc 1.75.0-nightly (4578435e1 2023-10-19)
binary: rustdoc
commit-hash: 4578435e1695863d921c7763d5a0add98f8e3869
commit-date: 2023-10-19
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doc-coverageArea: Calculating how much of a crate has documentationC-bugCategory: This is a bug.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