Stream: t-compiler

Topic: documentation coverage sketch

QuietMisdreavus (Jan 30 2019 at 17:28, on Zulip):

currently sketching out a --show-coverage option for rustdoc that counts the public items in the given crate and prints out some stats

pasted image

QuietMisdreavus (Jan 30 2019 at 17:29, on Zulip):

right now i'm excluding anything that wasn't originally defined in the current crate - i.e. re-exports aren't counted because they count toward their original crate

QuietMisdreavus (Jan 30 2019 at 17:30, on Zulip):

i'm considering counting trait impls separately, because often they don't need to be documented individually - the trait's own documentation can cover for them

QuietMisdreavus (Jan 30 2019 at 17:30, on Zulip):

just thought i'd show it off here since the discussions about "doc coverage" in here were what inspired it

nagisa (Jan 30 2019 at 17:37, on Zulip):

mods are also items, do these get counted as well?

QuietMisdreavus (Jan 30 2019 at 17:39, on Zulip):


QuietMisdreavus (Jan 30 2019 at 17:40, on Zulip):

one of the missing items in this sample were the crate-root docs

Wesley Wiser (Jan 30 2019 at 18:34, on Zulip):

@QuietMisdreavus That's looks cool! :thumbs_up:

QuietMisdreavus (Jan 30 2019 at 19:33, on Zulip):

hmm, is there a way to tell whether an item was created by a derive macro? a lot of the non-documented items in my twitter library came from #[derive(Serialize)]

QuietMisdreavus (Jan 30 2019 at 19:33, on Zulip):

i know the built-in derives get #[automatically_derived] on them (and i'm already skipping those) but proc-macros don't have the same luxury

QuietMisdreavus (Jan 30 2019 at 19:43, on Zulip):

current status, when running it on my twitter library

pasted image

Last update: Apr 06 2020 at 03:20UTC