From b96b939ad99bf1abe5992b5aa0a9fb457a182239 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 30 Aug 2026 21:20:18 -0500 Subject: [PATCH] Skip sources that never build for ESP8266 in the log literal lint --- script/ci-custom.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/script/ci-custom.py b/script/ci-custom.py index 007f75e8d0..a3001f5794 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -1035,7 +1035,40 @@ def _find_ternary_literals(text: str) -> Iterator[int]: yield m.end() -@lint_content_check(include=cpp_include, exclude=["tests/integration/fixtures/*"]) +# LOG_STR_LITERAL is a no op everywhere except ESP8266, so code that never builds there is skipped +# to avoid churn: platform specific sources and components for ESP32, LibreTiny, RP2 and Zephyr only. +LOG_LITERAL_LINT_EXCLUDE = [ + "*_esp32.cpp", + "*_esp32_*.cpp", + "*_esp_idf.cpp", + "*_rmt.cpp", + "*_zephyr.cpp", + "*_bk72xx.cpp", + "*_libretiny.cpp", + "*_pico_w.cpp", + "*_host.cpp", + "esphome/components/esp32*/*", + "esphome/components/bk72xx*/*", + "esphome/components/ln882h*/*", + "esphome/components/rp2*/*", + "esphome/components/zephyr*/*", + "esphome/components/host/*", + "esphome/components/libretiny*/*", + "esphome/components/bluetooth_proxy/*", + "esphome/components/bluetooth_connection/*", + "esphome/components/ble_client/*", + "esphome/components/bedjet/*", + "esphome/components/anova/*", + "esphome/components/xiaomi_ble/*", + "esphome/components/bthome_mithermometer/*", + "esphome/components/usb_host/*", + "esphome/components/zigbee/*", + # Test fixtures - not production embedded code + "tests/integration/fixtures/*", +] + + +@lint_content_check(include=cpp_include, exclude=LOG_LITERAL_LINT_EXCLUDE) def lint_log_no_bare_literal_ternary( fname: Path, content: str ) -> list[tuple[int, int, str]]: