fixed detection output order
This commit is contained in:
@@ -427,15 +427,6 @@ fn _print_unique_results(
|
||||
tail_word: String,
|
||||
color_map: &HashMap<String, Color>,
|
||||
) {
|
||||
let levels = Vec::from([
|
||||
"critical",
|
||||
"high",
|
||||
"medium",
|
||||
"low",
|
||||
"informational",
|
||||
"undefined",
|
||||
]);
|
||||
|
||||
// the order in which are registered and the order of levels to be displayed are reversed
|
||||
counts_by_level.reverse();
|
||||
|
||||
@@ -453,7 +444,7 @@ fn _print_unique_results(
|
||||
)
|
||||
.ok();
|
||||
|
||||
for (i, level_name) in levels.iter().enumerate() {
|
||||
for (i, level_name) in LEVEL_ABBR.keys().enumerate() {
|
||||
if "undefined" == *level_name {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ lazy_static! {
|
||||
.as_path()
|
||||
.display()
|
||||
));
|
||||
pub static ref LEVEL_ABBR: HashMap<String, String> = HashMap::from([
|
||||
pub static ref LEVEL_ABBR: LinkedHashMap<String, String> = LinkedHashMap::from_iter([
|
||||
("critical".to_string(), "crit".to_string()),
|
||||
("high".to_string(), "high".to_string()),
|
||||
("medium".to_string(), "med ".to_string()),
|
||||
|
||||
Reference in New Issue
Block a user