rust-lang / rust-lang/rust

`rustdoc --show-coverage --output-format json` missing many files

Open
#117,291 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-doc-coverage C-bug T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the discrepancy with the libnoise-0.1.0 commands and rustdoc 1.75.0-nightly shown in the report. Compare the files emitted by the human-readable and JSON forms of --show-coverage; done means the JSON output includes the same files as the table.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.