pub mod diff;
pub mod report;
pub mod runner;
pub mod threshold;
pub use diff::DiffFilter;
pub use report::{format_github_actions, format_summary, format_text};
pub use runner::CiRunner;
pub use threshold::ThresholdEvaluator;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CheckResult {
pub dead_code_count: usize,
pub clone_count: usize,
pub scaffolding_count: usize,
pub findings: Vec<crate::core::Finding>,
pub violations: Vec<ThresholdViolation>,
pub passed: bool,
pub diff_scope: Option<DiffScope>,
}
impl CheckResult {
pub fn exit_code(&self) -> i32 {
if self.passed {
0
} else {
1
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ThresholdViolation {
pub category: String,
pub threshold: usize,
pub actual: usize,
pub message: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DiffScope {
pub base_branch: String,
pub changed_files: Vec<String>,
pub total_changed: usize,
}