From 6cc63c481aa80c14ad4ea282b1847b9b1ca79a4a Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 1 Jul 2025 21:25:27 +0300 Subject: [PATCH] chore: bump clang-tools default version to 18 --- README.md | 8 ++++---- cpp_linter_hooks/util.py | 2 +- tests/test_util.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 031caa0..b77eb71 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ repos: rev: v0.8.1 hooks: - id: clang-format - args: [--style=file, --version=16] # Specifies version + args: [--style=file, --version=18] # Specifies version - id: clang-tidy - args: [--checks=.clang-tidy, --version=16] # Specifies version + args: [--checks=.clang-tidy, --version=18] # Specifies version ``` > [!IMPORTANT] @@ -66,10 +66,10 @@ repos: rev: v0.8.1 hooks: - id: clang-format - args: [--style=file, --version=16] + args: [--style=file, --version=18] files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ # limit the scope - id: clang-tidy - args: [--checks=.clang-tidy, --version=16] + args: [--checks=.clang-tidy, --version=18] files: ^(src|include)/.*\.(cpp|cc|cxx|h|hpp)$ ``` diff --git a/cpp_linter_hooks/util.py b/cpp_linter_hooks/util.py index 3a00041..2ee0c6d 100644 --- a/cpp_linter_hooks/util.py +++ b/cpp_linter_hooks/util.py @@ -10,7 +10,7 @@ LOG = logging.getLogger(__name__) -DEFAULT_CLANG_VERSION = "16" +DEFAULT_CLANG_VERSION = "18" # Default version for clang tools, can be overridden def is_installed(tool_name: str, version: str) -> Optional[Path]: diff --git a/tests/test_util.py b/tests/test_util.py index 2901083..3d9e903 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,7 +6,7 @@ from cpp_linter_hooks.util import ensure_installed, DEFAULT_CLANG_VERSION -VERSIONS = [None, "16"] +VERSIONS = [None, "18"] TOOLS = ["clang-format", "clang-tidy"]