use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BaselineMetrics {
pub total_code_lines: u64,
pub total_files: u64,
pub avg_cyclomatic: f64,
pub max_cyclomatic: u32,
pub avg_cognitive: f64,
pub max_cognitive: u32,
pub avg_nesting_depth: f64,
pub max_nesting_depth: u32,
pub function_count: u64,
pub avg_function_length: f64,
}
impl Default for BaselineMetrics {
fn default() -> Self {
Self {
total_code_lines: 0,
total_files: 0,
avg_cyclomatic: 0.0,
max_cyclomatic: 0,
avg_cognitive: 0.0,
max_cognitive: 0,
avg_nesting_depth: 0.0,
max_nesting_depth: 0,
function_count: 0,
avg_function_length: 0.0,
}
}
}