Commit 2027d307 authored by Carol (Nichols || Goulding)'s avatar Carol (Nichols || Goulding)
Browse files

Update README since it mostly works now

parent 9141eeab
Loading
Loading
Loading
Loading
+8 −37
Original line number Diff line number Diff line
# cargo doc-coverage

🚨 Warning! Doesn't work the way I want it to yet! 🚨

This crate does print out the percentage of public items that have
documentation. Unfortunately, it prints out the cumulative results after *each*
item that gets linted. The last result has the over all coverage, but I can't
figure out how to print this info only once after running the entire lint
rather than after every item.
This crate prints out the percentage of public items that have documentation.

## Installation and usage

I have gotten this to work with `rustc 1.15.0-nightly (d9bdc636d 2016-11-24)`. Assuming you use [rustup][], get on that nightly and install this plugin with the following commands:
I have gotten this to work with `rustc 1.15.0-nightly (d9bdc636d 2016-11-24)`.
Assuming you use [rustup][], get on that nightly and install this plugin with
the following commands:

```
$ rustup toolchain install nightly-2016-11-25
@@ -23,41 +19,16 @@ $ cargo doc-coverage
If you don't see any output, try doing a `cargo clean` or making a change in
your code to trigger a recompile.

What you should see is WAY TOO MUCH OUTPUT:
What you should see:

```
$ cargo doc-coverage
warning: 1 items, 1 undocumented, 0% documented

warning: 1 items, 1 undocumented, 0% documented

warning: 1 items, 1 undocumented, 0% documented

warning: 1 items, 1 undocumented, 0% documented

warning: 1 items, 1 undocumented, 0% documented

warning: 1 items, 1 undocumented, 0% documented

.....lots more.........
   Compiling nom v2.0.1 (file:///Users/carolnichols/rust/nom)
warning: 225 items, 117 undocumented, 48% documented

warning: 37 items, 15 undocumented, 59.45945945945946% documented

warning: 37 items, 15 undocumented, 59.45945945945946% documented

warning: 37 items, 15 undocumented, 59.45945945945946% documented

warning: 37 items, 15 undocumented, 59.45945945945946% documented
    Finished debug [unoptimized + debuginfo] target(s) in 0.77 secs
```

## Help

### Help

#### Help

If you know how I can hook into the linting system to output something only once when a lint is completely done, please let me know :)

## Inspiration/where most of this code came from

A large part of this code is from [clippy][] and the [rustc missing-docs lint][].