pub struct ConfigFile {Show 27 fields
pub gate: GateConfig,
pub max_depth: usize,
pub else_chain_threshold: usize,
pub max_params: usize,
pub forbid_attributes: PatternCheck,
pub forbid_types: PatternCheck,
pub forbid_calls: PatternCheck,
pub forbid_macros: PatternCheck,
pub check_naming: NamingCheck,
pub check_nested_if: bool,
pub check_if_in_match: bool,
pub check_nested_match: bool,
pub check_match_in_if: bool,
pub check_else_chain: bool,
pub forbid_else: bool,
pub forbid_unsafe: bool,
pub check_dyn_return: bool,
pub check_dyn_param: bool,
pub check_vec_box_dyn: bool,
pub check_dyn_field: bool,
pub check_clone_in_loop: bool,
pub check_default_hasher: bool,
pub check_mixed_concerns: bool,
pub check_inline_tests: bool,
pub check_let_underscore_result: bool,
pub check_high_param_count: bool,
pub overrides: BTreeMap<Box<str>, PathOverride>,
}Expand description
Deserialized .pedant.toml file with all check settings.
Fields§
§gate: GateConfigSecurity gate rules configuration.
max_depth: usizeDepth limit for nesting checks (default: 3).
else_chain_threshold: usizeBranch count that triggers else-chain (default: 3).
max_params: usizeMaximum parameter count before high-param-count fires (default: 5).
forbid_attributes: PatternCheckBanned attribute patterns (e.g., allow(dead_code)).
forbid_types: PatternCheckBanned type patterns (e.g., Arc<String>).
forbid_calls: PatternCheckBanned method call patterns (e.g., .unwrap()).
forbid_macros: PatternCheckBanned macro patterns (e.g., panic!).
check_naming: NamingCheckThresholds for the generic-naming check.
check_nested_if: boolFlag if inside if.
check_if_in_match: boolFlag if inside match arm.
check_nested_match: boolFlag match inside match.
check_match_in_if: boolFlag match inside if branch.
check_else_chain: boolFlag long if/else if chains.
forbid_else: boolFlag any use of the else keyword.
forbid_unsafe: boolFlag any unsafe block.
check_dyn_return: boolFlag dynamic dispatch in return types.
check_dyn_param: boolFlag dynamic dispatch in function parameters.
check_vec_box_dyn: boolFlag Vec<Box<dyn T>> anywhere.
check_dyn_field: boolFlag dynamic dispatch in struct fields.
check_clone_in_loop: boolFlag .clone() inside loop bodies.
check_default_hasher: boolFlag HashMap/HashSet with default SipHash hasher.
check_mixed_concerns: boolFlag disconnected type groups in a single file.
check_inline_tests: boolFlag #[cfg(test)] mod blocks embedded in source files.
check_let_underscore_result: boolFlag let _ = expr that discards a Result.
check_high_param_count: boolFlag functions with too many parameters.
overrides: BTreeMap<Box<str>, PathOverride>Per-path configuration overrides keyed by glob pattern.
Trait Implementations§
Source§impl Debug for ConfigFile
impl Debug for ConfigFile
Source§impl Default for ConfigFile
impl Default for ConfigFile
Source§fn default() -> ConfigFile
fn default() -> ConfigFile
Source§impl<'de> Deserialize<'de> for ConfigFile
impl<'de> Deserialize<'de> for ConfigFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConfigFile
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnsafeUnpin for ConfigFile
impl UnwindSafe for ConfigFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more