Skip to content

chore: bump clang-tools default version to 18 #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)$
```

Expand Down
2 changes: 1 addition & 1 deletion cpp_linter_hooks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand Down
Loading