diff --git a/tools/ci/check_build_warnings.py b/tools/ci/check_build_warnings.py index 738d3f299..3db99e8b1 100755 --- a/tools/ci/check_build_warnings.py +++ b/tools/ci/check_build_warnings.py @@ -18,7 +18,7 @@ except ImportError: sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) from find_build_apps import BuildItem, setup_logging -WARNING_REGEX = r"^\s+(?:error|warning)" +WARNING_REGEX = re.compile(r"^\s*(?:error|warning)", re.MULTILINE | re.IGNORECASE) IGNORE_WARNS = [ re.compile(r_str) for r_str in [ @@ -34,7 +34,7 @@ IGNORE_WARNS = [ def line_has_warnings(line): # type: (str) -> bool - if not re.search(WARNING_REGEX, line): + if not WARNING_REGEX.search(line): return False has_warnings = True