@@ -62,24 +62,39 @@ pub(crate) fn diff(old_path: &Path, new_path: &Path, truncate: bool) {
6262
6363 let mut lint_warnings = vec ! [ ] ;
6464
65+ println ! ( "| Lint | Added | Removed | Changed | Unchainged |" ) ;
66+ println ! ( "| ------------------------------------------ | ------: | ------: | ------: | ---------: |" ) ;
67+
6568 for ( name, changes) in & itertools:: merge_join_by ( old_warnings, new_warnings, |old, new| old. key ( ) . cmp ( & new. key ( ) ) )
6669 . chunk_by ( |change| change. as_ref ( ) . into_left ( ) . lint . to_string ( ) )
6770 {
6871 let mut added = Vec :: new ( ) ;
6972 let mut removed = Vec :: new ( ) ;
7073 let mut changed = Vec :: new ( ) ;
74+ let mut unchanged = 0 ;
7175 for change in changes {
7276 match change {
7377 EitherOrBoth :: Both ( old, new) => {
7478 if old. rendered != new. rendered {
7579 changed. push ( ( old, new) ) ;
80+ } else {
81+ unchanged += 1 ;
7682 }
7783 } ,
7884 EitherOrBoth :: Left ( old) => removed. push ( old) ,
7985 EitherOrBoth :: Right ( new) => added. push ( new) ,
8086 }
8187 }
8288
89+ println ! (
90+ "| {:<62} | {:>7} | {:>7} | {:>7} | {:>10} |" ,
91+ format!( "`{}`" , name) ,
92+ added. len( ) ,
93+ removed. len( ) ,
94+ changed. len( ) ,
95+ unchanged,
96+ ) ;
97+
8398 if !added. is_empty ( ) || !removed. is_empty ( ) || !changed. is_empty ( ) {
8499 lint_warnings. push ( LintWarnings {
85100 name,
@@ -90,6 +105,8 @@ pub(crate) fn diff(old_path: &Path, new_path: &Path, truncate: bool) {
90105 }
91106 }
92107
108+ println ! ( ) ;
109+ println ! ( ) ;
93110 print_summary_table ( & lint_warnings) ;
94111 println ! ( ) ;
95112
0 commit comments