pub struct CompiledConfig {
pub exclude_tests: bool,
pub thresholds: ThresholdsConfig,
/* private fields */
}Expand description
Compiled configuration with glob patterns
Fields§
§exclude_tests: boolWhether to exclude test code from analysis
thresholds: ThresholdsConfigThreshold configuration
Implementations§
Source§impl CompiledConfig
impl CompiledConfig
Sourcepub fn from_config(config: CouplingConfig) -> Result<Self, ConfigError>
pub fn from_config(config: CouplingConfig) -> Result<Self, ConfigError>
Create a compiled config from raw config
Sourcepub fn set_exclude_tests(&mut self, exclude: bool)
pub fn set_exclude_tests(&mut self, exclude: bool)
Set exclude_tests flag (used by CLI –exclude-tests option)
Sourcepub fn config_root(&self) -> Option<&Path>
pub fn config_root(&self) -> Option<&Path>
Get the directory the config was loaded from, if known.
Sourcepub fn is_prelude_module(&self, path: &str) -> bool
pub fn is_prelude_module(&self, path: &str) -> bool
Check if a module is marked as “prelude-like” (exempt from afferent coupling warnings)
Sourcepub fn should_exclude(&self, path: &str) -> bool
pub fn should_exclude(&self, path: &str) -> bool
Check if a path should be completely excluded from analysis
Sourcepub fn should_ignore(&self, path: &str) -> bool
pub fn should_ignore(&self, path: &str) -> bool
Check if a path should be ignored (deprecated: use should_exclude)
Sourcepub fn dead_patterns(
&self,
candidate_paths: &[String],
) -> Vec<DeadConfigPattern>
pub fn dead_patterns( &self, candidate_paths: &[String], ) -> Vec<DeadConfigPattern>
Scoring-affecting pattern strings (subdomains, volatility overrides) that matched none of the given analyzed paths.
A dead subdomain/volatility pattern silently reverts scoring to raw git churn,
so it is reported as drift. analysis.exclude and prelude_modules are NOT
reported: an unmatched exclude analyzes nothing wrongly (defensive future-proof
excludes are idiomatic), and a dead prelude exemption surfaces as visible
afferent warnings rather than silent misclassification.
Sourcepub fn prelude_module_count(&self) -> usize
pub fn prelude_module_count(&self) -> usize
Get the list of prelude module patterns (for reporting)
Sourcepub fn get_subdomain(&self, path: &str) -> Option<Subdomain>
pub fn get_subdomain(&self, path: &str) -> Option<Subdomain>
Get the DDD subdomain classification for a path, if any
Sourcepub fn has_subdomain_config(&self) -> bool
pub fn has_subdomain_config(&self) -> bool
Check if config has any subdomain classifications
Sourcepub fn get_volatility_override(&mut self, path: &str) -> Option<Volatility>
pub fn get_volatility_override(&mut self, path: &str) -> Option<Volatility>
Get overridden volatility for a path, if any
Priority: explicit volatility override > subdomain classification
Sourcepub fn get_volatility(
&mut self,
path: &str,
git_volatility: Volatility,
) -> Volatility
pub fn get_volatility( &mut self, path: &str, git_volatility: Volatility, ) -> Volatility
Get volatility with override, falling back to git-based value
Sourcepub fn has_volatility_overrides(&self) -> bool
pub fn has_volatility_overrides(&self) -> bool
Check if config has any volatility overrides
Trait Implementations§
Source§impl Clone for CompiledConfig
impl Clone for CompiledConfig
Source§fn clone(&self) -> CompiledConfig
fn clone(&self) -> CompiledConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompiledConfig
impl Debug for CompiledConfig
Source§impl MetricsConfig for CompiledConfig
impl MetricsConfig for CompiledConfig
Source§fn config_root(&self) -> Option<&Path>
fn config_root(&self) -> Option<&Path>
Source§fn has_volatility_overrides(&self) -> bool
fn has_volatility_overrides(&self) -> bool
Source§fn has_subdomain_config(&self) -> bool
fn has_subdomain_config(&self) -> bool
Source§fn get_subdomain(&self, path: &str) -> Option<Subdomain>
fn get_subdomain(&self, path: &str) -> Option<Subdomain>
Source§fn get_volatility_override(&mut self, path: &str) -> Option<Volatility>
fn get_volatility_override(&mut self, path: &str) -> Option<Volatility>
Auto Trait Implementations§
impl Freeze for CompiledConfig
impl RefUnwindSafe for CompiledConfig
impl Send for CompiledConfig
impl Sync for CompiledConfig
impl Unpin for CompiledConfig
impl UnsafeUnpin for CompiledConfig
impl UnwindSafe for CompiledConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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