mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
fix clang-tidy
This commit is contained in:
parent
ff97ba9bb3
commit
e541bd01cc
2 changed files with 2 additions and 31 deletions
|
@ -236,33 +236,7 @@ def main():
|
|||
files = split_list(files, args.split_num)[args.split_at - 1]
|
||||
|
||||
if args.all_headers and args.split_at in (None, 1):
|
||||
triplet = os.path.basename(idedata["cxx_path"])[:-4]
|
||||
exclude_components = []
|
||||
if "zephyr" in triplet:
|
||||
exclude_components = [
|
||||
"api",
|
||||
"bluetooth_proxy",
|
||||
"captive_portal",
|
||||
"e131",
|
||||
"esphome",
|
||||
"homeassistant",
|
||||
"http_request",
|
||||
"improv_base",
|
||||
"improv_serial",
|
||||
"md5", # FIXME
|
||||
"mlx90393", # FIXME
|
||||
"online_image",
|
||||
"ota",
|
||||
"prometheus",
|
||||
"sgp4x", # FIXME
|
||||
"socket",
|
||||
"status",
|
||||
"voice_assistant",
|
||||
"web_server",
|
||||
"web_server_base",
|
||||
"wireguard",
|
||||
]
|
||||
build_all_include(exclude_components)
|
||||
build_all_include()
|
||||
files.insert(0, temp_header_file)
|
||||
|
||||
tmpdir = None
|
||||
|
|
|
@ -29,7 +29,7 @@ def print_error_for_file(file, body):
|
|||
print()
|
||||
|
||||
|
||||
def build_all_include(exclude_components):
|
||||
def build_all_include():
|
||||
# Build a cpp file that includes all header files in this repo.
|
||||
# Otherwise header-only integrations would not be tested by clang-tidy
|
||||
headers = []
|
||||
|
@ -37,9 +37,6 @@ def build_all_include(exclude_components):
|
|||
filetypes = (".h",)
|
||||
ext = os.path.splitext(path)[1]
|
||||
if ext in filetypes:
|
||||
parts = path.split("/components/")
|
||||
if len(parts) > 1 and parts[1].split("/")[0] in exclude_components:
|
||||
continue
|
||||
path = os.path.relpath(path, root_path)
|
||||
include_p = path.replace(os.path.sep, "/")
|
||||
headers.append(f'#include "{include_p}"')
|
||||
|
|
Loading…
Reference in a new issue