From 8546c7228a7c6d05184693d6a1e45d1acba1fd23 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 30 Aug 2026 21:42:29 -0500 Subject: [PATCH] Exempt empty literals from the log literal lint --- script/ci-custom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/ci-custom.py b/script/ci-custom.py index d61990bec50..b781167dc48 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -1033,7 +1033,9 @@ def _find_ternary_literals(text: str) -> Iterator[tuple[int, str]]: branch = False for m in LOG_TERNARY_LITERAL_RE.finditer(text): tok = m.group(0) - if branch and tok[0] == '"': + # An empty literal is merged with every other string's terminator, so it costs no RAM, + # while a PSTR("") would add its own flash array; leave it alone. + if branch and tok[0] == '"' and tok != '""': yield m.start(), tok branch = tok[0] in "?:"