-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up mess for --show-coverage documentation #90438
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the docs for --show-coverage
earlier on the page are clearer and more comprehensive than the docs near the end of the page. Can you keep the earlier docs and get rid of the later docs instead?
14ef028
to
da895f9
Compare
Updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with these comments fixed
$ rustdoc src/lib.rs -Z unstable-options --show-coverage | ||
+-------------------------------------+------------+------------+------------+------------+ | ||
| File | Documented | Percentage | Examples | Percentage | | ||
+-------------------------------------+------------+------------+------------+------------+ | ||
| lib.rs | 4 | 100.0% | 1 | 25.0% | | ||
+-------------------------------------+------------+------------+------------+------------+ | ||
| Total | 4 | 100.0% | 1 | 25.0% | | ||
+-------------------------------------+------------+------------+------------+------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you keep this example and put it in the merged section?
Calculating code examples follows these rules: | ||
|
||
1. These items aren't accounted by default: | ||
* struct/union field | ||
* enum variant | ||
* constant | ||
* static | ||
* typedef | ||
2. If one of the previously listed items has a code example, then it'll be counted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like there's corresponding docs in the new section about this? Maybe move this part to the new section as well?
[`--show-coverage`](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--show-coverage-get-statistics-about-code-documentation-coverage), | ||
passing `--output-format json` will display the coverage information in JSON format. For example, | ||
here is the JSON for a file with one documented item and one undocumented item: | ||
When using `--output-format json` with this option, it will display the coverage information in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using `--output-format json` with this option, it will display the coverage information in | |
#### JSON output | |
When using `--output-format json` with this option, it will display the coverage information in |
[JSON format](https://github.com/rust-lang/rfcs/pull/2963). `--output-format html` has no effect, | ||
and is also accepted on stable toolchains. | ||
|
||
It can also be used with `--show-coverage`. Take a look at its | ||
[documentation](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--show-coverage-get-statistics-about-code-documentation-coverage) for more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[documentation](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--show-coverage-get-statistics-about-code-documentation-coverage) for more | |
[documentation](#--show-coverage-get-statistics-about-code-documentation-coverage) for more |
da895f9
to
530eaa8
Compare
Updated! @bors: r=camelid rollup |
📌 Commit 530eaa8 has been approved by |
…=camelid Clean up mess for --show-coverage documentation It was somewhat duplicated for some reasons... Anyway, this remove this duplication and clean up a bit. r? `@camelid`
…=camelid Clean up mess for --show-coverage documentation It was somewhat duplicated for some reasons... Anyway, this remove this duplication and clean up a bit. r? ``@camelid``
Rollup of 8 pull requests Successful merges: - rust-lang#90386 (Add `-Zassert-incr-state` to assert state of incremental cache) - rust-lang#90438 (Clean up mess for --show-coverage documentation) - rust-lang#90480 (Mention `Vec::remove` in `Vec::swap_remove`'s docs) - rust-lang#90607 (Make slice->str conversion and related functions `const`) - rust-lang#90750 (rustdoc: Replace where-bounded Clean impl with simple function) - rust-lang#90895 (require full validity when determining the discriminant of a value) - rust-lang#90989 (Avoid suggesting literal formatting that turns into member access) - rust-lang#91002 (rustc: Remove `#[rustc_synthetic]`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…ty-line, r=camelid Put back removed empty line Fixes comment from rust-lang#90438 (comment). r? `@camelid`
…ty-line, r=camelid Put back removed empty line Fixes comment from rust-lang#90438 (comment). r? ``@camelid``
…ty-line, r=camelid Put back removed empty line Fixes comment from rust-lang#90438 (comment). r? ```@camelid```
…ty-line, r=camelid Put back removed empty line Fixes comment from rust-lang#90438 (comment). r? ````@camelid````
It was somewhat duplicated for some reasons... Anyway, this remove this duplication and clean up a bit.
r? @camelid