From b3281e0c2e430e62ebcc28d9161430e90c46b1f6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Mar 2026 01:32:51 -1000 Subject: [PATCH] Address review: add word boundary and soften SBO wording --- script/ci-custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/ci-custom.py b/script/ci-custom.py index 9d8be448382..1da923b095a 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -891,13 +891,13 @@ def lint_no_powf_in_core(fname, match): @lint_re_check( - r"std\s*::\s*bind\s*\(" + CPP_RE_EOL, + r"[^\w]std\s*::\s*bind\s*\(" + CPP_RE_EOL, include=cpp_include, ) def lint_no_std_bind(fname, match): return ( f"{highlight('std::bind()')} is not allowed in new ESPHome code. " - f"Lambdas are clearer, produce smaller binaries, and fit within " + f"Lambdas are clearer, produce smaller binaries, and are more likely to fit within " f"the {highlight('std::function')} small-buffer optimization (avoiding heap allocation).\n" f"Please use a lambda instead.\n" f" Before: {highlight('std::bind(&Class::method, this, std::placeholders::_1)')}\n"