1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

[CI] Update clang-tidy to 18.1.3 (#7822)

This commit is contained in:
Keith Burzinski
2024-12-02 16:29:45 -06:00
committed by GitHub
parent e08a9cc3a3
commit 9c8976be13
5 changed files with 37 additions and 15 deletions

View File

@@ -63,8 +63,6 @@ def clang_options(idedata):
"-Ddeprecated(x)=",
# allow to condition code on the presence of clang-tidy
"-DCLANG_TIDY",
# (esp-idf) Disable this header because they use asm with registers clang-tidy doesn't know
"-D__XTENSA_API_H__",
# (esp-idf) Fix __once_callable in some libstdc++ headers
"-D_GLIBCXX_HAVE_TLS",
]
@@ -238,7 +236,7 @@ def main():
failed_files = []
try:
executable = get_binary("clang-tidy", 14)
executable = get_binary("clang-tidy", 18)
task_queue = queue.Queue(args.jobs)
lock = threading.Lock()
for _ in range(args.jobs):
@@ -283,12 +281,12 @@ def main():
print("Applying fixes ...")
try:
try:
subprocess.call(["clang-apply-replacements-14", tmpdir])
subprocess.call(["clang-apply-replacements-18", tmpdir])
except FileNotFoundError:
subprocess.call(["clang-apply-replacements", tmpdir])
except FileNotFoundError:
print(
"Error please install clang-apply-replacements-14 or clang-apply-replacements.\n",
"Error please install clang-apply-replacements-18 or clang-apply-replacements.\n",
file=sys.stderr,
)
except: