From ef80ab205c3d37bf18bbdc9f692a5f1b44baa792 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 15 Jan 2023 10:12:00 +0100 Subject: [PATCH] Mark Settings::for_rule(s) as test-only --- src/settings/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settings/mod.rs b/src/settings/mod.rs index 95ae21a688..453a0028af 100644 --- a/src/settings/mod.rs +++ b/src/settings/mod.rs @@ -12,6 +12,7 @@ use globset::{Glob, GlobMatcher, GlobSet}; use itertools::Either::{Left, Right}; use itertools::Itertools; use once_cell::sync::Lazy; +#[cfg(test)] use path_absolutize::path_dedot; use regex::Regex; use rustc_hash::FxHashSet; @@ -221,6 +222,7 @@ impl Settings { }) } + #[cfg(test)] pub fn for_rule(rule_code: RuleCode) -> Self { Self { allowed_confusables: FxHashSet::from_iter([]), @@ -266,6 +268,7 @@ impl Settings { } } + #[cfg(test)] pub fn for_rules(rule_codes: Vec) -> Self { Self { allowed_confusables: FxHashSet::from_iter([]),