[clang-tidy] Hash idf_component.yml and trigger hash hook on more inputs (#16753)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
Jonathan Swoboda
2026-06-03 23:48:34 -04:00
committed by GitHub
parent 53d685f242
commit ffaa31febc
3 changed files with 8 additions and 2 deletions

View File

@@ -1 +1 @@
a30d2e50f2cac76e9c504eb7e5b250070dc92df23469c44a7eb8e52e26fd375d
44db8a62d94c8fba83b95b73938db4377ebacc0adb504881387389f1cd8f2f3a

View File

@@ -63,7 +63,7 @@ repos:
name: Update clang-tidy hash
entry: python script/clang_tidy_hash.py --update-if-changed
language: python
files: ^(\.clang-tidy|platformio\.ini|requirements_dev\.txt)$
files: ^(\.clang-tidy|platformio\.ini|requirements_dev\.txt|sdkconfig\.defaults|esphome/idf_component\.yml)$
pass_filenames: false
additional_dependencies: []
- id: ci-custom

View File

@@ -105,6 +105,12 @@ def calculate_clang_tidy_hash(repo_root: Path | None = None) -> str:
sdkconfig_content = read_file_bytes(sdkconfig_path)
hasher.update(sdkconfig_content)
# Hash esphome/idf_component.yml: its managed deps drive the ESP-IDF
# build's include set, which clang-tidy analyzes.
idf_component_path = repo_root / "esphome" / "idf_component.yml"
if idf_component_path.exists():
hasher.update(read_file_bytes(idf_component_path))
return hasher.hexdigest()