From afc955b5022a76c2dc1833ae7e230e2afee2d37b Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 5 Aug 2025 13:02:16 +0000 Subject: [PATCH 1/2] docs: add FAQ section --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 3f5d274..8bcc0d0 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ A powerful [pre-commit](https://pre-commit.com/) hook for auto-formatting and li - [Troubleshooting](#troubleshooting) - [Performance Optimization](#performance-optimization) - [Verbose Output](#verbose-output) +- [FAQ](#faq) + - [What's the difference between `cpp-linter-hooks` and `mirrors-clang-format`?](#whats-the-difference-between-cpp-linter-hooks-and-mirrors-clang-format) - [Contributing](#contributing) - [License](#license) @@ -181,6 +183,19 @@ repos: args: [--style=file, --version=18, --verbose] # Add -v or --verbose for detailed output ``` +## FAQ + +### What's the difference between [`cpp-linter-hooks`](https://github.com/cpp-linter/cpp-linter-hooks) and [`mirrors-clang-format`](https://github.com/pre-commit/mirrors-clang-format)? + +| Feature | [`cpp-linter-hooks`](https://github.com/cpp-linter/cpp-linter-hooks) | [`mirrors-clang-format`](https://github.com/pre-commit/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` | ❌ | + + ## Contributing We welcome contributions! Whether it's fixing issues, suggesting improvements, or submitting pull requests, your support is greatly appreciated. From efad7969bf4680bfe7a77268240b4ed00b04a7cb Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 5 Aug 2025 13:06:19 +0000 Subject: [PATCH 2/2] docs: update markdown table --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8bcc0d0..213ba9a 100644 --- a/README.md +++ b/README.md @@ -187,13 +187,13 @@ repos: ### What's the difference between [`cpp-linter-hooks`](https://github.com/cpp-linter/cpp-linter-hooks) and [`mirrors-clang-format`](https://github.com/pre-commit/mirrors-clang-format)? -| Feature | [`cpp-linter-hooks`](https://github.com/cpp-linter/cpp-linter-hooks) | [`mirrors-clang-format`](https://github.com/pre-commit/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` | ❌ | +| 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` | ❌ | ## Contributing