You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
args: [--style=file] # Loads style from .clang-format file
53
53
- id: clang-tidy
54
54
args: [--checks=.clang-tidy] # Loads checks from .clang-tidy file
55
55
```
56
56
57
+
> [!TIP]
58
+
> By default, the latest version of [`clang-format`](https://pypi.org/project/clang-format/#history) and [`clang-tidy`](https://pypi.org/project/clang-tidy/#history) will be installed if not specified. You can specify the version using the `--version` argument in the `args` list as shown below.
59
+
57
60
### Custom Clang Tool Version
58
61
59
62
To use specific versions of clang-format and clang-tidy (using Python wheel packages):
args: [--style=file, --version=21] # Specifies version
68
71
- id: clang-tidy
69
72
args: [--checks=.clang-tidy, --version=21] # Specifies version
70
73
```
71
74
72
-
> [!NOTE]
73
-
> Starting from version **v1.0.0**, this pre-commit hook now relies on Python wheel packages — [clang-format](https://pypi.org/project/clang-format/) and [clang-tidy](https://pypi.org/project/clang-tidy/) — instead of the [clang-tools binaries](https://github.com/cpp-linter/clang-tools-static-binaries). The wheel packages are lighter, easier to install, and offer better cross-platform compatibility. For more information, see the [detailed migration notes](docs/migration-notes.md).
74
-
75
75
## Output
76
76
77
77
### clang-format Output
@@ -151,7 +151,7 @@ Use -header-filter=.* to display errors from all non-system headers. Use -system
0 commit comments