Skip to content

Commit 3e2ca84

Browse files
committed
Use mirrors-clang-format for clang-format check
Also moves to clang-format-22
1 parent e2d91b2 commit 3e2ca84

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

.clang-format

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
BasedOnStyle: LLVM
2+
3+
AccessModifierOffset: -4
4+
5+
AlignConsecutiveMacros: true
6+
AlignConsecutiveBitFields: true
7+
AlignEscapedNewlines: Right
8+
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: Empty
11+
12+
AlwaysBreakTemplateDeclarations: Yes
13+
14+
BinPackParameters: false
15+
16+
BraceWrapping:
17+
AfterCaseLabel: true
18+
AfterClass: true
19+
AfterControlStatement: Never
20+
AfterEnum: true
21+
AfterFunction: true
22+
AfterNamespace: true
23+
AfterObjCDeclaration: false
24+
AfterStruct: true
25+
AfterUnion: true
26+
AfterExternBlock: true
27+
BeforeCatch: false
28+
BeforeElse: true
29+
BeforeLambdaBody: false
30+
BeforeWhile: false
31+
IndentBraces: false
32+
SplitEmptyFunction: true
33+
SplitEmptyRecord: true
34+
SplitEmptyNamespace: true
35+
BreakBeforeBraces: Custom
36+
37+
ColumnLimit: 80
38+
39+
IndentWidth: 4
40+
IndentWrappedFunctionNames: true
41+
42+
Standard: c++17

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ repos:
4949
hooks:
5050
- id: black
5151

52-
- repo: https://github.com/pocc/pre-commit-hooks
53-
rev: v1.3.5
52+
- repo: https://github.com/pre-commit/mirrors-clang-format
53+
rev: v22.1.0
5454
hooks:
5555
- id: clang-format
5656
args: ["-i"]

0 commit comments

Comments
 (0)