Skip to content

Commit 6833433

Browse files
committed
fix(config): merge duplicate pre-commit hooks and add clang-format, clippy
- Consolidate duplicate pre-commit-hooks references into one - Add clang-format hook for C++ files (uses existing .clang-format) - Add clippy hook for Rust files (uses existing .clippy.toml) - Organize hooks by language for clarity
1 parent 4f34d93 commit 6833433

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.pre-commit-config.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Run manually: pre-commit run --all-files
44

55
repos:
6-
# Go formatting
6+
# General checks (consolidated)
77
- repo: https://github.com/pre-commit/pre-commit-hooks
88
rev: v4.5.0
99
hooks:
@@ -12,6 +12,16 @@ repos:
1212
- id: check-yaml
1313
- id: check-added-large-files
1414
args: ['--maxkb=1000']
15+
- id: check-case-conflict
16+
- id: check-merge-conflict
17+
- id: detect-private-key
18+
19+
# C++ formatting (uses existing .clang-format)
20+
- repo: https://github.com/pre-commit/mirrors-clang-format
21+
rev: v18.1.1
22+
hooks:
23+
- id: clang-format
24+
files: \.(cpp|h)$
1525

1626
# Go formatting and linting
1727
- repo: https://github.com/TekWizely/pre-commit-golang
@@ -22,26 +32,20 @@ repos:
2232
- id: go-vet
2333
files: \.go$
2434

25-
# Rust formatting
35+
# Rust formatting and linting (uses existing .clippy.toml)
2636
- repo: https://github.com/doublify/pre-commit-rust
2737
rev: v1.0
2838
hooks:
2939
- id: fmt
3040
files: \.rs$
3141
args: ['--check']
42+
- id: clippy
43+
files: \.rs$
3244

33-
# Python
45+
# Python formatting
3446
- repo: https://github.com/psf/black
3547
rev: 24.1.1
3648
hooks:
3749
- id: black
3850
language_version: python3
3951
files: \.py$
40-
41-
# General checks
42-
- repo: https://github.com/pre-commit/pre-commit-hooks
43-
rev: v4.5.0
44-
hooks:
45-
- id: check-case-conflict
46-
- id: check-merge-conflict
47-
- id: detect-private-key

0 commit comments

Comments
 (0)