1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! Code quality analysis module.
//!
//! Provides tools for analyzing and improving code quality:
//!
//! - **Clone Detection** ([`clones`]): Detect code duplication (Type-1, Type-2, Type-3)
//! - **Type-1 (textual)**: Exact copies ignoring whitespace/comments
//! - **Type-2 (structural)**: Same structure with renamed identifiers
//! - **Type-3 (near-miss)**: Similar structure with modifications
//!
//! - **Code Smells** ([`smells`]): Detection of design anti-patterns
//! - **Long Method**: Methods that are too long and complex
//! - **God Class**: Classes that do too much (violate SRP)
//!
//! - **Circular Dependencies** ([`circular`]): Detect dependency cycles
//! - **Module level**: Import cycles (A imports B imports A)
//! - **Package level**: Package-to-package cycles
//! - **Class level**: Class usage cycles
//! - **Function level**: Call graph cycles
//!
//! # Type-1 Clone Detection (Textual)
//!
//! ```ignore
//! use go_brrr::quality::clones::{detect_clones, CloneConfig};
//!
//! // Detect code clones in a project
//! let result = detect_clones("./src", Some(6), None)?;
//! println!("Found {} clone groups ({:.1}% duplication)",
//! result.clone_groups.len(),
//! result.stats.duplication_percentage);
//! ```
//!
//! # Type-2/Type-3 Clone Detection (Structural)
//!
//! ```ignore
//! use go_brrr::quality::clones::{detect_structural_clones, StructuralCloneConfig};
//!
//! // Detect structural clones with 80% similarity threshold
//! let result = detect_structural_clones("./src", Some(0.8), None)?;
//! println!("Found {} Type-2 and {} Type-3 clone groups",
//! result.stats.type2_groups,
//! result.stats.type3_groups);
//! ```
//!
//! # Long Method Detection
//!
//! ```ignore
//! use go_brrr::quality::smells::{detect_long_methods, LongMethodConfig};
//!
//! // Detect long methods with default thresholds
//! let result = detect_long_methods("./src", Some("python"), None)?;
//! for finding in &result.findings {
//! println!("{}: {} lines, complexity {}",
//! finding.function_name, finding.length.lines, finding.complexity.cyclomatic);
//! for suggestion in &finding.suggestions {
//! println!(" -> {}", suggestion.description);
//! }
//! }
//! ```
//!
//! # God Class Detection
//!
//! ```ignore
//! use go_brrr::quality::smells::{detect_god_classes, GodClassConfig};
//!
//! // Detect God classes with default thresholds
//! let result = detect_god_classes("./src", None, None)?;
//! for finding in &result.findings {
//! println!("{}: score={:.1}, severity={}",
//! finding.class_name, finding.score, finding.severity);
//! }
//! ```
// Re-export Type-1 (textual) clone detection for convenience
pub use ;
// Re-export Type-2/Type-3 (structural) clone detection
pub use ;
// Re-export Long Method detection
pub use ;
// Re-export God class detection
pub use ;
// Re-export Circular dependency detection
pub use ;