update(falco): always enable rules warnings

Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
This commit is contained in:
Andrea Terzolo
2024-01-04 18:11:20 +01:00
committed by poiana
parent b318c165da
commit f5dea33b5e
2 changed files with 3 additions and 9 deletions

View File

@@ -79,10 +79,9 @@ falco::app::run_result falco::app::actions::load_rules_files(falco::app::state&
break;
}
// If verbose is true, also print any warnings
if(s.options.verbose && res->has_warnings())
if(res->has_warnings())
{
fprintf(stderr, "%s\n", res->as_string(true, rc).c_str());
falco_logger::log(falco_logger::level::WARNING,res->as_string(true, rc) + "\n");
}
}

View File

@@ -114,12 +114,7 @@ falco::app::run_result falco::app::actions::validate_rules_files(falco::app::sta
// file was ok with warnings, without actually
// printing the warnings.
summary += filename + ": Ok, with warnings";
// If verbose is true, print the warnings now.
if(s.options.verbose)
{
fprintf(stderr, "%s\n", res->as_string(true, rc).c_str());
}
falco_logger::log(falco_logger::level::WARNING, res->as_string(true, rc) + "\n");
}
}