diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index d973585990..88ea3acac1 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -23,14 +23,7 @@ jobs: - name: Install dependencies run: | pip3 install tox - sudo apt-get -y install clang-tidy-15 - - # TODO: Remove once issue with Ubuntu 24.04 and clang++-15 is resolved. - - name: Work around https://github.com/actions/runner-images/issues/8659 - run: | - sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-noble.list - sudo apt-get update - sudo apt-get install -y --allow-downgrades libc6=2.39-* libc6-dev=2.39-* libstdc++6=12-* libgcc-s1=12-* + sudo apt-get -y install clang-tidy-16 - name: Install uncrustify run: | diff --git a/misc/style/run-clang-tidy.py b/misc/style/run-clang-tidy.py index c9728da7f4..8b3360b43e 100755 --- a/misc/style/run-clang-tidy.py +++ b/misc/style/run-clang-tidy.py @@ -103,10 +103,10 @@ def check_search_code_with_clang_tidy(): {{key: performance-unnecessary-value-param.AllowedTypes, value: "{';'.join(LIGHTWEIGHT_TYPES)}"}},\ ]}}""".replace(" ", "") cmd = [ - "run-clang-tidy-15", + "run-clang-tidy-16", "-quiet", "-p", build_dir, - "-clang-tidy-binary=clang-tidy-15", + "-clang-tidy-binary=clang-tidy-16", "-checks=-*," + ",".join(checks), f"-config={config}", ] @@ -116,7 +116,7 @@ def check_search_code_with_clang_tidy(): try: p = subprocess.run(cmd, cwd=DIR, text=True, capture_output=True, check=False) except FileNotFoundError: - sys.exit(f"run-clang-tidy-15 not found. Is it on the PATH?") + sys.exit(f"run-clang-tidy-16 not found. Is it on the PATH?") output = f"{p.stdout}\n{p.stderr}" errors = re.findall(r"^(.*:\d+:\d+: .*(?:warning|error): .*)$", output, flags=re.M) filtered_errors = [error for error in errors if not any(ignore in error for ignore in IGNORES)] @@ -126,7 +126,7 @@ def check_search_code_with_clang_tidy(): for error in filtered_errors: print(error) fix_cmd = cmd + [ - "-clang-apply-replacements-binary=clang-apply-replacements-15", "-fix"] + "-clang-apply-replacements-binary=clang-apply-replacements-16", "-fix"] print("\nYou may be able to fix some of these issues with the following command:\n" + " ".join(pipes.quote(x) for x in fix_cmd)) sys.exit(1)