Skip to content

Commit

Permalink
update(falco): always enable rules warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <[email protected]>
  • Loading branch information
Andreagit97 committed Jan 4, 2024
1 parent e930f40 commit 468897b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 2 additions & 3 deletions userspace/falco/app/actions/load_rules_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down
7 changes: 1 addition & 6 deletions userspace/falco/app/actions/validate_rules_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down

0 comments on commit 468897b

Please sign in to comment.