diff --git a/Cargo.toml b/Cargo.toml index e9f8760..4b45029 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,10 @@ members = [ "hooked-config" ] resolver = "2" + +[workspace.lints.clippy] +missing_docs_in_private_items = "warn" + +[workspace.lints.rust] +missing_docs = "warn" +unsafe_code = "forbid" diff --git a/hooked-cli/source/cli/cli_reference.rs b/hooked-cli/source/cli/cli_reference.rs index 998c1d9..85a28bb 100644 --- a/hooked-cli/source/cli/cli_reference.rs +++ b/hooked-cli/source/cli/cli_reference.rs @@ -31,7 +31,7 @@ pub fn hooked_cli_reference( for command_name in commands_to_document { let output = Command::new("cargo") .env("NO_COLOR", "1") - .args(&["run", "-q", "--", command_name, "--help"]) + .args(["run", "-q", "--", command_name, "--help"]) .output() .unwrap(); let usage = str::from_utf8(&output.stdout).unwrap().trim().to_string(); @@ -44,7 +44,7 @@ pub fn hooked_cli_reference( let mut context = Context::new(); context.insert("commands", &commands); write( - &out_path, + out_path, Tera::one_off(REFERENCE_TEMPLATE, &context, false)?, )?; diff --git a/hooked-cli/source/main.rs b/hooked-cli/source/main.rs index e70b765..8361310 100644 --- a/hooked-cli/source/main.rs +++ b/hooked-cli/source/main.rs @@ -2,9 +2,6 @@ //! //! > **Git hooks manager.** -#![forbid(unsafe_code)] -#![warn(missing_docs, clippy::missing_docs_in_private_items)] - use { clap::Parser, color_eyre::{install, Result}, diff --git a/hooked-cli/source/utilities/mod.rs b/hooked-cli/source/utilities/mod.rs index 2e68b7a..747f21a 100644 --- a/hooked-cli/source/utilities/mod.rs +++ b/hooked-cli/source/utilities/mod.rs @@ -20,7 +20,7 @@ pub fn plural(count: usize, singular: &str, plural: Option<&str>) -> String { pub fn globset_from_strings(input: &[String]) -> Result { let mut builder = GlobSetBuilder::new(); for glob in input { - builder.add(Glob::new(&glob)?); + builder.add(Glob::new(glob)?); } builder.build().map_err(Into::into)