Skip to main content

entrenar/citl/trainer/
config.rs

1//! CITL configuration types
2
3/// Configuration for the CITL trainer
4#[derive(Debug, Clone)]
5pub struct CITLConfig {
6    /// Maximum number of fix suggestions to return
7    pub max_suggestions: usize,
8    /// Minimum suspiciousness score to report
9    pub min_suspiciousness: f32,
10    /// Whether to build dependency graphs
11    pub enable_dependency_graph: bool,
12}
13
14impl Default for CITLConfig {
15    fn default() -> Self {
16        Self { max_suggestions: 5, min_suspiciousness: 0.3, enable_dependency_graph: true }
17    }
18}
19
20#[cfg(test)]
21mod tests {
22    use super::*;
23
24    #[test]
25    fn test_citl_config_default() {
26        let config = CITLConfig::default();
27        assert_eq!(config.max_suggestions, 5);
28        assert!((config.min_suspiciousness - 0.3).abs() < 0.01);
29        assert!(config.enable_dependency_graph);
30    }
31}