improve regex
This commit is contained in:
parent
961a8cf85e
commit
c35b010a3f
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ except ImportError:
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
||||||
from find_build_apps import BuildItem, setup_logging
|
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 = [
|
IGNORE_WARNS = [
|
||||||
re.compile(r_str) for r_str in [
|
re.compile(r_str) for r_str in [
|
||||||
|
@ -34,7 +34,7 @@ IGNORE_WARNS = [
|
||||||
|
|
||||||
|
|
||||||
def line_has_warnings(line): # type: (str) -> bool
|
def line_has_warnings(line): # type: (str) -> bool
|
||||||
if not re.search(WARNING_REGEX, line):
|
if not WARNING_REGEX.search(line):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
has_warnings = True
|
has_warnings = True
|
||||||
|
|
Loading…
Reference in a new issue