From cf4195606a70f4a326c6c5290ca5c2acaf40ec75 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 10 Sep 2020 18:04:23 +1000 Subject: [PATCH] Fix prefix check script Fix the prefix check that matches any line with "prefix:" that fails tox. The prefix check fails on the following line which is valid. failure-notification-prefix: "[releng]" require a space before prefix: now it cannot match failure-notification-prefix: Change-Id: I2d5ee1eb7c858bd5eac03af02f44db2f4a9e46a8 Signed-off-by: Anil Belur --- check_prefix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_prefix.py b/check_prefix.py index 08f83653d..de561981c 100755 --- a/check_prefix.py +++ b/check_prefix.py @@ -24,7 +24,7 @@ def check_prefix(filename): """Check if a prefix was checked into this repo.""" with open(filename, "r") as _file: for num, line in enumerate(_file, 1): - if re.search("prefix:", line): + if re.search(r"^\s+prefix:", line): if '""' not in line: print( "ERROR: A non-blank prefix is defined in " -- 2.36.6