[ci] Catch out-of-class member log tags and keep midea's in flash (#20674)

This commit is contained in:
J. Nick Koston
2026-10-14 12:21:24 +13:00
committed by GitHub
parent 92f6ab8367
commit c6e90de262
5 changed files with 13 additions and 6 deletions
+5
View File
@@ -401,6 +401,8 @@ def test_ternary_error_message_names_the_literal() -> None:
'static const char TAG[8] = "x";',
' static const char *const TAG = "x";',
'constexpr static const char *const TAG = "x";',
'const char *const Constants::TAG = "x";',
'const char Constants::TAG[] = "x";',
],
)
def test_log_tag_macro_flags_plain_tags(line: str) -> None:
@@ -413,6 +415,7 @@ def test_log_tag_macro_flags_plain_tags(line: str) -> None:
'ESPHOME_LOG_TAG(TAG, "x");',
'static const char *const NAME = "x";',
'static const char *const TAG = "x"; // NOLINT',
'const char Constants::TAG[] PROGMEM = "x";',
],
)
def test_log_tag_macro_ignores_macro_and_other_names(line: str) -> None:
@@ -452,6 +455,8 @@ def test_log_tag_lints_cover_headers_and_core(fname: str, covered: bool) -> None
"std::string(TAG);",
"std::string name = TAG;",
"std::string name{TAG};",
"strlen(Constants::TAG);",
"this->set_timeout(Constants::TAG, 100, cb);",
],
)
def test_log_tag_as_string_flags_string_uses(line: str) -> None: