changed hidden rule count output when excluded and noisy and rule parsing error count 0
This commit is contained in:
@@ -374,6 +374,7 @@ impl Detection {
|
|||||||
let args = &configs::CONFIG.read().unwrap().args;
|
let args = &configs::CONFIG.read().unwrap().args;
|
||||||
|
|
||||||
sorted_ld_rc.into_iter().for_each(|(key, value)| {
|
sorted_ld_rc.into_iter().for_each(|(key, value)| {
|
||||||
|
if value != &0_u128 {
|
||||||
let disable_flag = if key == "noisy" && !args.enable_noisy_rules {
|
let disable_flag = if key == "noisy" && !args.enable_noisy_rules {
|
||||||
" (Disabled)"
|
" (Disabled)"
|
||||||
} else {
|
} else {
|
||||||
@@ -386,13 +387,16 @@ impl Detection {
|
|||||||
value,
|
value,
|
||||||
disable_flag,
|
disable_flag,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if err_rc != &0_u128 {
|
||||||
write_color_buffer(
|
write_color_buffer(
|
||||||
BufferWriter::stdout(ColorChoice::Always),
|
BufferWriter::stdout(ColorChoice::Always),
|
||||||
Some(Color::Red),
|
Some(Color::Red),
|
||||||
&format!("Rule parsing errors: {}", err_rc),
|
&format!("Rule parsing errors: {}", err_rc),
|
||||||
)
|
)
|
||||||
.ok();
|
.ok();
|
||||||
|
}
|
||||||
println!();
|
println!();
|
||||||
|
|
||||||
let mut sorted_st_rc: Vec<(&String, &u128)> = st_rc.iter().collect();
|
let mut sorted_st_rc: Vec<(&String, &u128)> = st_rc.iter().collect();
|
||||||
|
|||||||
Reference in New Issue
Block a user