mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
[ci] Catch out-of-class member log tags and keep midea's in flash (#20674)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user