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
|
use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct GitMetricsConfig<'a> {
pub added_style: &'a str,
pub deleted_style: &'a str,
pub only_nonzero_diffs: bool,
pub format: &'a str,
pub disabled: bool,
pub ignore_submodules: bool,
}
impl<'a> Default for GitMetricsConfig<'a> {
fn default() -> Self {
GitMetricsConfig {
added_style: "bold green",
deleted_style: "bold red",
only_nonzero_diffs: true,
format: "([+$added]($added_style) )([-$deleted]($deleted_style) )",
disabled: true,
ignore_submodules: false,
}
}
}
|