pub struct BaselineComplexitySection {
pub total_functions: usize,
pub avg_function_length: f64,
pub max_function_length: usize,
pub avg_cyclomatic: f64,
pub max_cyclomatic: usize,
pub avg_cognitive: Option<f64>,
pub max_cognitive: Option<usize>,
pub avg_nesting_depth: Option<f64>,
pub max_nesting_depth: Option<usize>,
pub high_risk_files: usize,
}Expand description
Complexity section mirroring analysis receipt structure for ratchet compatibility.
This provides the same field names as ComplexityReport so that JSON pointers
like /complexity/avg_cyclomatic work consistently across baselines and receipts.
Fields§
§total_functions: usizeTotal number of functions analyzed.
avg_function_length: f64Average function length in lines.
max_function_length: usizeMaximum function length found.
avg_cyclomatic: f64Average cyclomatic complexity across all files.
max_cyclomatic: usizeMaximum cyclomatic complexity found in any file.
avg_cognitive: Option<f64>Average cognitive complexity across all files.
max_cognitive: Option<usize>Maximum cognitive complexity found.
avg_nesting_depth: Option<f64>Average nesting depth across all files.
max_nesting_depth: Option<usize>Maximum nesting depth found.
high_risk_files: usizeNumber of high-risk files.
Trait Implementations§
Source§impl Clone for BaselineComplexitySection
impl Clone for BaselineComplexitySection
Source§fn clone(&self) -> BaselineComplexitySection
fn clone(&self) -> BaselineComplexitySection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BaselineComplexitySection
impl Debug for BaselineComplexitySection
Source§impl<'de> Deserialize<'de> for BaselineComplexitySection
impl<'de> Deserialize<'de> for BaselineComplexitySection
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BaselineComplexitySection
impl RefUnwindSafe for BaselineComplexitySection
impl Send for BaselineComplexitySection
impl Sync for BaselineComplexitySection
impl Unpin for BaselineComplexitySection
impl UnsafeUnpin for BaselineComplexitySection
impl UnwindSafe for BaselineComplexitySection
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
Mutably borrows from an owned value. Read more