syncable_cli/analyzer/monorepo/
config.rs

1/// Configuration for monorepo detection
2#[derive(Debug, Clone)]
3pub struct MonorepoDetectionConfig {
4    /// Maximum depth to search for projects
5    pub max_depth: usize,
6    /// Minimum confidence threshold for considering a directory as a project
7    pub min_project_confidence: f32,
8    /// Whether to analyze subdirectories that might be projects
9    pub deep_scan: bool,
10    /// Patterns to exclude from project detection
11    pub exclude_patterns: Vec<String>,
12}
13
14impl Default for MonorepoDetectionConfig {
15    fn default() -> Self {
16        Self {
17            // Monorepos often nest apps/libs 3–5 levels deep (e.g., apps/api/src)
18            max_depth: 5,
19            min_project_confidence: 0.6,
20            deep_scan: true,
21            exclude_patterns: vec![
22                "node_modules".to_string(),
23                ".git".to_string(),
24                "target".to_string(),
25                "build".to_string(),
26                "dist".to_string(),
27                ".next".to_string(),
28                "__pycache__".to_string(),
29                "vendor".to_string(),
30                ".venv".to_string(),
31                "venv".to_string(),
32                ".env".to_string(),
33                "coverage".to_string(),
34                "docs".to_string(),
35                "tmp".to_string(),
36                "temp".to_string(),
37            ],
38        }
39    }
40}