aboutsummaryrefslogtreecommitdiff
path: root/libbbot/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-06-20 20:33:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-06-21 13:09:10 +0300
commit5c186f901ea7d1b09ab551a3fd2a6c1fd2426d59 (patch)
treeaa41f235d3ef632c481390745bc0d589bd9c554e /libbbot/manifest.hxx
parent4ef51955f2c0c2da17bb922d52fd39eae0bf4464 (diff)
Add support for build configuration warning-detecting regexes
Diffstat (limited to 'libbbot/manifest.hxx')
-rw-r--r--libbbot/manifest.hxx21
1 files changed, 19 insertions, 2 deletions
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<butl::target_triplet> 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