@@ -2424,6 +2424,20 @@ fn format_as_markdown(comments: &[core::Comment]) -> String {
24242424 }
24252425 output. push ( '\n' ) ;
24262426
2427+ let rule_hits = summarize_rule_hits ( comments, 12 ) ;
2428+ if !rule_hits. is_empty ( ) {
2429+ output. push_str ( "### Issues by Rule\n \n " ) ;
2430+ output. push_str ( "| Rule | Count | Error | Warning | Info | Suggestion |\n " ) ;
2431+ output. push_str ( "|------|-------|-------|---------|------|------------|\n " ) ;
2432+ for ( rule_id, hit) in rule_hits {
2433+ output. push_str ( & format ! (
2434+ "| `{}` | {} | {} | {} | {} | {} |\n " ,
2435+ rule_id, hit. total, hit. errors, hit. warnings, hit. infos, hit. suggestions
2436+ ) ) ;
2437+ }
2438+ output. push ( '\n' ) ;
2439+ }
2440+
24272441 // Recommendations
24282442 if !summary. recommendations . is_empty ( ) {
24292443 output. push_str ( "### Recommendations\n \n " ) ;
@@ -3091,6 +3105,20 @@ fn format_smart_review_output(
30913105 }
30923106 output. push ( '\n' ) ;
30933107
3108+ let rule_hits = summarize_rule_hits ( comments, 12 ) ;
3109+ if !rule_hits. is_empty ( ) {
3110+ output. push_str ( "#### By Rule\n \n " ) ;
3111+ output. push_str ( "| Rule | Count | Error | Warning | Info | Suggestion |\n " ) ;
3112+ output. push_str ( "|------|-------|-------|---------|------|------------|\n " ) ;
3113+ for ( rule_id, hit) in rule_hits {
3114+ output. push_str ( & format ! (
3115+ "| `{}` | {} | {} | {} | {} | {} |\n " ,
3116+ rule_id, hit. total, hit. errors, hit. warnings, hit. infos, hit. suggestions
3117+ ) ) ;
3118+ }
3119+ output. push ( '\n' ) ;
3120+ }
3121+
30943122 // Actionable Recommendations
30953123 if !summary. recommendations . is_empty ( ) {
30963124 output. push_str ( "### 🎯 Priority Actions\n \n " ) ;
0 commit comments