jenkins-bot merged this change.
scripts/maintenance/diff_checker.py: Fix a bug in detecting "" as error
Single-quoted empty strings are preferred to double-quotes ones, but
diff_checker did not detect such cases because the ending quotation
marks were being detected as part of the starting quotation marks.
STRING_MATCH: Require at list one character after the starting quotation mark.
Change-Id: Id215527268c286d7f228dbef0e030a93843e9bdf
---
M scripts/maintenance/diff_checker.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/maintenance/diff_checker.py b/scripts/maintenance/diff_checker.py
index 608f501..1bc2727 100644
--- a/scripts/maintenance/diff_checker.py
+++ b/scripts/maintenance/diff_checker.py
@@ -46,7 +46,7 @@
IGNORABLE_LONG_LINE = re_compile(r'\s*(# )?<?https?://\S+>?$').match
STRING_MATCH = re_compile(
- r'(?P<prefix>[bfru]*)?(?P<quote>\'+|"+)', IGNORECASE,
+ r'(?P<prefix>[bfru]*)?(?P<quote>\'+|"+).', IGNORECASE,
).match
To view, visit change 463249. To unsubscribe, or for help writing mail filters, visit settings.