mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-04 08:04:49 +00:00
Add an "Ok, with warnings" overall status.
In outputs it could be confusing to see a line: <filename>: Ok followed by a set of warnings. To differentiate this, add a top level status "Ok, with warnings" when rule loading was successful but had warnings. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -266,7 +266,19 @@ const std::string& rule_loader::result::as_summary_string()
|
||||
os << name << ": ";
|
||||
}
|
||||
|
||||
os << (success ? "Ok" : "Invalid");
|
||||
if(success)
|
||||
{
|
||||
os << "Ok";
|
||||
|
||||
if (!warnings.empty())
|
||||
{
|
||||
os << ", with warnings";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
os << "Invalid";
|
||||
}
|
||||
|
||||
if(!errors.empty())
|
||||
{
|
||||
@@ -326,7 +338,19 @@ const std::string& rule_loader::result::as_verbose_string(const rules_contents_t
|
||||
os << name << ": ";
|
||||
}
|
||||
|
||||
os << (success ? "Ok" : "Invalid");
|
||||
if(success)
|
||||
{
|
||||
os << "Ok";
|
||||
|
||||
if (!warnings.empty())
|
||||
{
|
||||
os << ", with warnings";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
os << "Invalid";
|
||||
}
|
||||
|
||||
if (!errors.empty())
|
||||
{
|
||||
|
Reference in New Issue
Block a user