chore(userspace,unit_tests): properly report all schema validation warnings from yaml_helper::validate_node().

`-V` option will print all warnings, while normal run will only print foremost warning.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro
2024-09-10 11:36:56 +02:00
committed by poiana
parent 2f89a2c140
commit 468037151a
6 changed files with 103 additions and 55 deletions

View File

@@ -248,7 +248,7 @@ namespace rule_loader
const std::string& msg,
const context& ctx);
void set_schema_validation_status(const std::string& status);
void set_schema_validation_status(const std::vector<std::string>& status);
std::string schema_validation();
protected:
@@ -256,7 +256,7 @@ namespace rule_loader
const std::string& as_verbose_string(const falco::load_result::rules_contents_t& contents);
std::string name;
bool success;
std::string schema_validation_str;
std::vector<std::string> schema_validation_status;
std::vector<error> errors;
std::vector<warning> warnings;