From 5c186f901ea7d1b09ab551a3fd2a6c1fd2426d59 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 20 Jun 2017 20:33:52 +0300 Subject: Add support for build configuration warning-detecting regexes --- libbbot/manifest.hxx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'libbbot/manifest.hxx') diff --git a/libbbot/manifest.hxx b/libbbot/manifest.hxx index b981ab4..36f2f5b 100644 --- a/libbbot/manifest.hxx +++ b/libbbot/manifest.hxx @@ -131,23 +131,34 @@ namespace bbot // strings config; + // Regular expressions for detecting warnings in the operation result logs + // (in addition to the default list of expressions). + // Note: could be quoted. + // + strings warning_regex; + strings unquoted_config () const; + strings + unquoted_warning_regex () const; + task_manifest (std::string nm, bpkg::version vr, bpkg::repository_location rl, strings tr, std::string mn, butl::optional tg, - strings cf) + strings cf, + strings wr) : name (std::move (nm)), version (std::move (vr)), repository (std::move (rl)), trust (tr), machine (std::move (mn)), target (std::move (tg)), - config (std::move (cf)) {} + config (std::move (cf)), + warning_regex (std::move (wr)){} public: task_manifest () = default; // VC export. @@ -165,6 +176,12 @@ namespace bbot // static void check_config (const std::string&); + + // Check that a string is a valid (ECMAScript) regular expression. Throw + // invalid_argument if that's not the case. + // + static void + check_regex (const std::string&); }; class LIBBBOT_EXPORT task_response_manifest -- cgit v1.1