Wider range of check return values
I'd like to overhaul the way we run checks and standardise how we handle errors. Right now we just return true or false, which isn't very useful.
What I propose is the following:
First we replace BOOL return values with an enum of {good, bad, warn, fail}. Good means the check completed successfully and nothing was detected. Bad means the check completed successfully and detected something. Warn means the outcome of the check was inconclusive. Fail means that some prerequisite was not met or an API call failed.
Secondly we add a standardised mechanism for reporting additional information from checks that doesn't mess up the output format. Effectively we offer a printf equivalent function for output that pushes messages to an std::vector which we can then print out after the check completes. I'd like to also have these messages tagged with some sort of level so that we can filter them - by default only showing errors (so we can say why a check failed if it failed), but with the ability to specify a debug level on the command line at a later date for increased verbosity.
@LordNoteworthy I'd like your feedback on this before I go ahead and start the work.
Source: ayoubfaouzi/al-khaser