code complexity & repetition analysis tool
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

make clippy happy

+6 -6
+3 -3
crates/cli/src/commands/analyze.rs
··· 99 99 println!("{} {}", "FILE:".blue().bold(), file.path.display().bold()); 100 100 101 101 let complexity_value = file.cyclomatic.file_complexity; 102 - let complexity_text = format!("Cyclomatic Complexity: {}", complexity_value); 102 + let complexity_text = format!("Cyclomatic Complexity: {complexity_value}"); 103 103 104 104 if complexity_value > config.complexity.error_threshold { 105 105 println!(" {}", complexity_text.red().bold()); ··· 127 127 } else if func.complexity > config.complexity.warning_threshold { 128 128 println!("{}", func_text.yellow()); 129 129 } else { 130 - println!("{}", func_text); 130 + println!("{func_text}"); 131 131 } 132 132 } 133 133 println!(); ··· 170 170 171 171 println!("{}", " ┌─────".dimmed()); 172 172 for line in highlighted.lines() { 173 - println!(" │ {}", line); 173 + println!(" │ {line}"); 174 174 } 175 175 println!("{}", " └─────".dimmed()); 176 176 }
+1 -1
crates/cli/src/commands/clones.rs
··· 95 95 96 96 println!("{}", " ┌─────".dimmed()); 97 97 for line in highlighted.lines() { 98 - println!(" │ {}", line); 98 + println!(" │ {line}"); 99 99 } 100 100 println!("{}", " └─────".dimmed()); 101 101 }
+2 -2
crates/cli/src/commands/complexity.rs
··· 79 79 println!("{} {}", "FILE:".blue().bold(), file.path.display().bold()); 80 80 81 81 let complexity_value = file.cyclomatic.file_complexity; 82 - let complexity_text = format!("Cyclomatic Complexity: {}", complexity_value); 82 + let complexity_text = format!("Cyclomatic Complexity: {complexity_value}"); 83 83 84 84 if complexity_value > config.complexity.error_threshold { 85 85 println!(" {}", complexity_text.red().bold()); ··· 106 106 } else if func.complexity > config.complexity.warning_threshold { 107 107 println!("{}", func_text.yellow()); 108 108 } else { 109 - println!("{}", func_text); 109 + println!("{func_text}"); 110 110 } 111 111 } 112 112 println!();