Skip to content
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
2 changes: 2 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
entry: clang-format-hook
language: python
files: \.(h\+\+|h|hh|hxx|hpp|c|cc|cpp|c\+\+|cxx)$
require_serial: true

- id: clang-tidy
name: clang-tidy
description: Automatically install any specific version of clang-tidy and diagnose/fix typical programming errors
entry: clang-tidy-hook
language: python
files: \.(h\+\+|h|hh|hxx|hpp|c|cc|cpp|c\+\+|cxx)$
require_serial: true
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add this configuration to your `.pre-commit-config.yaml` file:
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v0.8.1 # Use the tag or commit you want
rev: v0.8.3 # 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 @@ -44,7 +44,7 @@ To use custom configurations like `.clang-format` and `.clang-tidy`:
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v0.8.1
rev: v0.8.3
hooks:
- id: clang-format
args: [--style=file] # Loads style from .clang-format file
Expand All @@ -59,7 +59,7 @@ To use specific versions of [clang-tools](https://github.com/cpp-linter/clang-to
```yaml
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v0.8.1
rev: v0.8.3
hooks:
- id: clang-format
args: [--style=file, --version=18] # Specifies version
Expand Down Expand Up @@ -146,7 +146,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: v0.8.1
rev: v0.8.3
hooks:
- id: clang-format
args: [--style=file, --version=18]
Expand All @@ -172,7 +172,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: v0.8.1
rev: v0.8.3
hooks:
- id: clang-format
args: [--style=file, --version=18, --verbose] # Add -v or --verbose for detailed output
Expand Down
Loading