From 0f26e3c9ed80de076a2aeff0ed0bea44ecc8b9cd Mon Sep 17 00:00:00 2001
From: Federico Di Pierro <nierro92@gmail.com>
Date: Tue, 10 Sep 2024 13:56:44 +0200
Subject: [PATCH] chore(userspace): adjusted
 `rule_loader::result::as_verbose_string` following errors and warnings output
 layout.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
---
 userspace/engine/rule_loader.cpp | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/userspace/engine/rule_loader.cpp b/userspace/engine/rule_loader.cpp
index 3639fbc127d..c04ab3b47cc 100644
--- a/userspace/engine/rule_loader.cpp
+++ b/userspace/engine/rule_loader.cpp
@@ -375,7 +375,7 @@ const std::string& rule_loader::result::as_summary_string()
 		{
 			os << std::endl;
 
-			os << schema_validation_status.size() << " schema warnings: [";
+			os << " " << schema_validation_status.size() << " schema warnings: [";
 			bool first = true;
 			for(auto& status : schema_validation_status)
 			{
@@ -472,22 +472,17 @@ const std::string& rule_loader::result::as_verbose_string(const rules_contents_t
 		{
 			os << std::endl;
 
-			os << schema_validation_status.size() << " schema warnings: [";
-			bool first = true;
+			os << schema_validation_status.size()
+			   << " Schema warnings:"  << std::endl;
+
 			for(auto& status : schema_validation_status)
 			{
-				if(!first)
-				{
-					os << " ";
-				}
-				first = false;
-
-				os << status;
+				os << "------" << std::endl;
+				os << status << std::endl;
 			}
-			os << "]";
+			os << "------" << std::endl;
 		}
 	}
-
 	if (!errors.empty())
 	{
 		os << std::endl;