Skip to content

Commit f048c07

Browse files
authored
Merge pull request #99 from IntelPython/change-pre-commit-clang-format
[MAINT] Change clang-format for pre-commit
2 parents c3bfcac + dfe83fc commit f048c07

File tree

9 files changed

+2408
-1945
lines changed

9 files changed

+2408
-1945
lines changed

.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

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ e76aa3a5a4b889c0434f0103ec102a50b93ab1ca
88

99
# Added more pre-commit hooks
1010
c52e36d98bbe4b0318d537088eb4f7495278f7bb
11+
12+
# Moved to clang-format-22
13+
fc63ac35af0e0feff6abafaa24ec7c12827f0f18

.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)