Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
docs: updates the readme with better details and a demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Aug 21, 2015
1 parent c0a2965 commit 27a944c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ A cargo subcommand for displaying line counts of source code in projects, includ

## Demo

Running `cargo count --separator , --unsafe-statistics` in the [Rust](https://github.com/rust-lang/rust) repo yields these results:
To count the source code in the [Rust](https://github.com/rust-lang/rust) repository, and print some naive statistics on how much "unsafe" code exists.

**NOTE:** The Rust repository is quite large, if you're on a slow internet connect consider using a smaller repository, such as the `cargo-count` repo.

```
$ git clone https://github.com/rust-lang/rust
$ cd rust
$ cargo count --separator , --unsafe-statistics
Gathering information...
Language Files Lines Blanks Comments Code Unsafe (%)
-------- ----- ----- ------ -------- ---- ----------
Expand All @@ -23,7 +28,7 @@ Gathering information...
Totals: 6,125 547,813 65,934 166,777 315,102 9,280 (2.95%)
```

The `-s ,` sets a `,` character as the thousands separator, and `--unsafe-statistics` looks for, and counts `unsafe` blocks.
The `--separator ,` sets a `,` character as the thousands separator, and `--unsafe-statistics` looks for, and counts lines of `unsafe`.

## Compiling

Expand Down

0 comments on commit 27a944c

Please sign in to comment.