-
Notifications
You must be signed in to change notification settings - Fork 3
docs: add FAQ section #94
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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` | ❌ | | ||||||||||||||||||||||||||||||
|
| 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`](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 `--style=file` (or default `.clang-format`) | ✅ (default behavior) | | |
| Specify `clang-format` version | ✅ via `--version` | ✅ via `rev` | | |
| Supports formatting code from stdin | ✅ via `-` (stdin) | ❌ | | |
| Verbose output | ✅ via `--verbose` | ❌ | |
🤖 Prompt for AI Agents
In README.md around lines 190 to 196, the feature descriptions in the comparison
table are misleading regarding style configuration loading and code string
passing. Update the "Loads style configuration" row to remove "via --version"
and clarify that style configuration is automatically loaded from a
.clang-format file or specified with --style=file. For the "Supports passing
code string" row, replace "via --style" with a clear statement that the tool
supports formatting code read from stdin (using -). This will accurately reflect
the features and avoid confusion.
Uh oh!
There was an error while loading. Please reload this page.