mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 16:30:22 +00:00
[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:
co-authored by
J. Nick Koston
J. Nick Koston
parent
53d685f242
commit
ffaa31febc
+1
-1
@@ -1 +1 @@
|
|||||||
a30d2e50f2cac76e9c504eb7e5b250070dc92df23469c44a7eb8e52e26fd375d
|
44db8a62d94c8fba83b95b73938db4377ebacc0adb504881387389f1cd8f2f3a
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ repos:
|
|||||||
name: Update clang-tidy hash
|
name: Update clang-tidy hash
|
||||||
entry: python script/clang_tidy_hash.py --update-if-changed
|
entry: python script/clang_tidy_hash.py --update-if-changed
|
||||||
language: python
|
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
|
pass_filenames: false
|
||||||
additional_dependencies: []
|
additional_dependencies: []
|
||||||
- id: ci-custom
|
- id: ci-custom
|
||||||
|
|||||||
@@ -105,6 +105,12 @@ def calculate_clang_tidy_hash(repo_root: Path | None = None) -> str:
|
|||||||
sdkconfig_content = read_file_bytes(sdkconfig_path)
|
sdkconfig_content = read_file_bytes(sdkconfig_path)
|
||||||
hasher.update(sdkconfig_content)
|
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()
|
return hasher.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user