Skip to content

Conversation

@RincewindsHat
Copy link
Member

This PR introduces a lot of new stuff to lib part which is mostly related to generating the results.

The idea is, that a plugin has a main result object (of type mp_check) to which you add partial results, called subchecks (mp_subcheck).
This mp_subchecks can also contain mp_subchecks, so you have a tree of results.

Ideally we remove all of that specific logic/string handling and so on from the individual plugins, which would reduce complexity (in the plugins).
Also this would open the path to centrally structure and format output, which would be cool for me, since I have a hard time regarding the output of some plugins (cough check_disk).

The handling would be something like

mp_check main = mp_check_init();

subcheck1 = check_filesystem_A();
subcheck2 = check_filesystem_B();
subcheck3 = check_something_else();

mp_add_subcheck_to_check(main, subcheck1);
mp_add_subcheck_to_check(main, subcheck2);
mp_add_subcheck_to_check(main, subcheck3);

mp_exit(main);

No plugin was changed here, the functionality is implemented in
parallel to the existing stuff (mostly), so it can be included
and plugins can be adapted incrementaly following that (which I plan to do).

Problems

  • This introduces features from C11/C17, so this will break backwards compatibility

@RincewindsHat RincewindsHat requested a review from a team December 28, 2023 22:46
@RincewindsHat
Copy link
Member Author

Also, sorry @sni, this is likely going in your direction.

@RincewindsHat RincewindsHat marked this pull request as ready for review February 15, 2024 02:07
@RincewindsHat RincewindsHat requested a review from sni March 25, 2024 00:30
@RincewindsHat
Copy link
Member Author

building block for a solution to #1098

@RincewindsHat
Copy link
Member Author

starting point for #1416

@RincewindsHat
Copy link
Member Author

replaced by #2064

@RincewindsHat RincewindsHat deleted the output_stuff branch February 25, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant