Skip to content

Commit 0505f9c

Browse files
committed
Validate and format json files too
1 parent 0302fc1 commit 0505f9c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.clang-format

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
Language: Json
3+
IndentWidth: 2
4+
---
25
Language: Cpp
36
AccessModifierOffset: -2
47
AlignAfterOpenBracket: Align

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ repos:
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
9+
- id: check-json
910
- id: check-yaml
11+
exclude: ^\.clang-format$
1012
- id: check-added-large-files
1113

1214
# Clang-format for C++
@@ -16,7 +18,7 @@ repos:
1618
rev: v18.1.8
1719
hooks:
1820
- id: clang-format
19-
types_or: [c++, c]
21+
types_or: [c++, c, json]
2022

2123
# CMake linting and formatting
2224
- repo: https://github.com/BlankSpruce/gersemi

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
{
146146
"name": "clang-16",
147147
"inherits": "common",
148-
"configurePreset": "clang-16",
148+
"configurePreset": "clang-16"
149149
}
150150
],
151151
"testPresets": [

0 commit comments

Comments
 (0)