@@ -7,7 +7,7 @@ use crate::{
7
7
registry:: { FindingRegistry , WorkflowRegistry } ,
8
8
} ;
9
9
use annotate_snippets:: { Level , Renderer , Snippet } ;
10
- use anstream:: println;
10
+ use anstream:: { print , println} ;
11
11
use owo_colors:: OwoColorize ;
12
12
use terminal_link:: Link ;
13
13
@@ -92,10 +92,21 @@ pub(crate) fn render_findings(registry: &WorkflowRegistry, findings: &FindingReg
92
92
}
93
93
}
94
94
95
+ if findings. ignored ( ) . is_empty ( ) {
96
+ print ! (
97
+ "{nfindings} findings: " ,
98
+ nfindings = ( findings. findings( ) . len( ) + findings. ignored( ) . len( ) ) . green( ) ,
99
+ ) ;
100
+ } else {
101
+ print ! (
102
+ "{nfindings} findings ({nignored} ignored): " ,
103
+ nfindings = ( findings. findings( ) . len( ) + findings. ignored( ) . len( ) ) . green( ) ,
104
+ nignored = findings. ignored( ) . len( ) . bright_yellow( )
105
+ ) ;
106
+ }
107
+
95
108
println ! (
96
- "{nfindings} findings ({nignored} ignored): {nunknown} unknown, {ninformational} informational, {nlow} low, {nmedium} medium, {nhigh} high" ,
97
- nfindings = ( findings. findings( ) . len( ) + findings. ignored( ) . len( ) ) . green( ) ,
98
- nignored = findings. ignored( ) . len( ) . bright_yellow( ) ,
109
+ "{nunknown} unknown, {ninformational} informational, {nlow} low, {nmedium} medium, {nhigh} high" ,
99
110
nunknown = findings_by_severity. get( & Severity :: Unknown ) . unwrap_or( & 0 ) ,
100
111
ninformational = findings_by_severity. get( & Severity :: Informational ) . unwrap_or( & 0 ) . purple( ) ,
101
112
nlow = findings_by_severity. get( & Severity :: Low ) . unwrap_or( & 0 ) . cyan( ) ,
0 commit comments