Skip to content
Merged
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
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Add this configuration to your `.pre-commit-config.yaml` file:
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.8 # Use the tag or commit you want
rev: v1.1.11 # Use the tag or commit you want
hooks:
- id: clang-format
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
Expand All @@ -46,7 +46,7 @@ To use custom configurations like `.clang-format` and `.clang-tidy`:
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.8
rev: v1.1.11
hooks:
- id: clang-format
args: [--style=file] # Loads style from .clang-format file
Expand All @@ -64,7 +64,7 @@ To use specific versions of clang-format and clang-tidy (using Python wheel pack
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.8
rev: v1.1.11
hooks:
- id: clang-format
args: [--style=file, --version=21] # Specifies version
Expand Down Expand Up @@ -151,7 +151,7 @@ Use -header-filter=.* to display errors from all non-system headers. Use -system

```yaml
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.8
rev: v1.1.11
hooks:
- id: clang-format
args: [--style=file, --version=21]
Expand All @@ -177,7 +177,7 @@ This approach ensures that only modified files are checked, further speeding up
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.1.8
rev: v1.1.11
hooks:
- id: clang-format
args: [--style=file, --version=21, --verbose] # Add -v or --verbose for detailed output
Expand All @@ -189,11 +189,13 @@ repos:

| Feature | `cpp-linter-hooks` | `mirrors-clang-format` |
|----------------------------------|-------------------------------------------|----------------------------------------|
| Supports `clang-format` and `clang-tidy` | ✅ (`clang-format` & `clang-tidy`) | ✅ (`clang-format` only) |
| Loads style configuration | ✅ via `--version` | ✅ (default behavior) |
| Specify `clang-format` version | ✅ via `--version` | ✅ via `rev` |
| Supports passing code string | ✅ via `--style` | ❌ |
| Verbose output | ✅ via `--verbose` | ❌ |
| Supports `clang-format` and `clang-tidy` | ✅ (`clang-format` & `clang-tidy`)| ✅ (`clang-format` only) |
| Custom configuration files | ✅ `.clang-format`, `.clang-tidy` | ✅ `.clang-format` |
| Specify `clang-format` and `clang-tidy` version | ✅ via `--version` | ✅ via `rev` |
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "version" should be plural "versions" since it refers to both clang-format and clang-tidy.

Suggested change
| Specify `clang-format` and `clang-tidy` version | ✅ via `--version` | ✅ via `rev` |
| Specify `clang-format` and `clang-tidy` versions | ✅ via `--version` | ✅ via `rev` |

Copilot uses AI. Check for mistakes.
| Supports passing format style string | ✅ via `--style` | ❌ |
| Verbose output | ✅ via `--verbose` | ❌ |
| Dry-run mode | ✅ via `--dry-run` | ❌ |


<!-- > [!TIP]
> In most cases, there is no significant performance difference between `cpp-linter-hooks` and `mirrors-clang-format`. See the [benchmark results](testing/benchmark.md) for details. -->
Expand Down
Loading