From e541bd01ccb0a95b5c69a45649bc763f7d3c6052 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Wed, 14 Aug 2024 17:34:29 +0200 Subject: [PATCH] fix clang-tidy --- script/clang-tidy | 28 +--------------------------- script/helpers.py | 5 +---- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/script/clang-tidy b/script/clang-tidy index 1f235507f8..3f40932fad 100755 --- a/script/clang-tidy +++ b/script/clang-tidy @@ -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 diff --git a/script/helpers.py b/script/helpers.py index b9b1707ccd..0be7e9beb2 100644 --- a/script/helpers.py +++ b/script/helpers.py @@ -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}"')