1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! # git-anger-management
//!
//! ## What
//!
//! Have you ever wondered how much you or your co-workers actually curse in
//! your commit messages? Worry no more, `git-anger-management` is here to help
//! you. Simply run it against your repository and it'll tell you who is the
//! naughtiest of them all.
//!
//! [![asciicast](https://asciinema.org/a/218651.svg)](https://asciinema.org/a/218651)
//!
//! ## Why
//!
//! Some times the only way to vent at the ridiculous crap we make is to write
//! really angry commit messages, I do it all the time. And I wanted to know
//! just how angry I get.
//!
//! # Installation
//!
//! Make sure you have Rust installed (I recommend installing via
//! [rustup](https://rustup.rs/)), then run `cargo install
//! git-anger-management`. You can now check how naughty you are by running `git
//! anger-management` in the directory where you want to check naughtiness.
//!
//! Output should look something like this:
//!
//! ```sh
//! $ git anger-management
//! repo: (46/569) naughty commits/commits
//! {
//!     "goddamn": 2,
//!     "shit": 7,
//!     "fuck": 18,
//!     "bloody": 2,
//!     "fucking": 15,
//!     "fucked": 1,
//!     "tits": 1
//! }
//! Sondre Nilsen: (46/495) naughty commits/commits
//! {
//!     "goddamn": 2,
//!     "shit": 7,
//!     "tits": 1,
//!     "bloody": 2,
//!     "fucking": 15,
//!     "fucked": 1,
//!     "fuck": 18
//! }
//! ```
//!
//! You can also point it to other directories if you want to look somwhere else
//! but you're too lazy to actually `cd` into that directory:
//!
//! ```sh
//! $ git anger-management ../../other-repo/
//! other-repo: (3/56) naughty commits/commits
//! {
//!     "goddamn": 1,
//!     "fuck": 1,
//!     "fucking": 1
//! }
//! Sondre Nilsen: (3/56) naughty commits/commits
//! {
//!     "goddamn": 1,
//!     "fuck": 1,
//!     "fucking": 1
//! }
//! ```
//!
//! Or look at the help by running `git anger-management -h`.
#![doc(html_root_url = "https://docs.rs/git-anger-management/0.6.0")]
#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
#![forbid(unsafe_code)]
#![deny(
    clippy::all,
    missing_docs,
    missing_debug_implementations,
    missing_copy_implementations,
    trivial_casts,
    unused_import_braces,
    unused_allocation
)]
mod author;
mod core;
mod repo;

pub use crate::author::Author;
pub use crate::core::{naughty_word, split_into_clean_words};
pub use crate::repo::Repo;