mirror of
https://github.com/esphome/esphome.git
synced 2026-09-14 16:48:40 +00:00
Merge remote-tracking branch 'origin/entity-types-xmacro' into integration
This commit is contained in:
+1
-1
@@ -672,7 +672,7 @@ def lint_using_esp_idf_deprecated(fname, line, col, content):
|
||||
)
|
||||
|
||||
|
||||
@lint_content_check(include=["*.h"])
|
||||
@lint_content_check(include=["*.h"], exclude=["esphome/core/entity_types.h"])
|
||||
def lint_pragma_once(fname, content):
|
||||
if "#pragma once" not in content:
|
||||
return (
|
||||
|
||||
+7
-1
@@ -167,11 +167,17 @@ def build_all_include(header_files: list[str] | None = None) -> None:
|
||||
cmd = ["git", "ls-files", "esphome/**/*.h"]
|
||||
proc = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
||||
|
||||
from esphome.writer import ENTITY_TYPES_H_TARGET
|
||||
|
||||
# X-macro files are included multiple times with different macro definitions
|
||||
# and must not be included bare
|
||||
exclude = {ENTITY_TYPES_H_TARGET}
|
||||
|
||||
# Process git output - git already returns paths relative to repo root
|
||||
header_files = [
|
||||
line.replace(os.path.sep, "/")
|
||||
for line in proc.stdout.strip().split("\n")
|
||||
if line
|
||||
if line and line.replace(os.path.sep, "/") not in exclude
|
||||
]
|
||||
|
||||
headers = [f'#include "{h}"' for h in header_files]
|
||||
|
||||
Reference in New Issue
Block a user