Skip to content

Commit 023993f

Browse files
committed
feat: add clang-format file
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
1 parent 49f7610 commit 023993f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.clang-format

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Configuration file for clang-format.
2+
#
3+
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
4+
---
5+
Language: Cpp
6+
BasedOnStyle: LLVM
7+
8+
UseTab: Always
9+
IndentWidth: 8
10+
TabWidth: 8
11+
ContinuationIndentWidth: 8
12+
IndentCaseLabels: false
13+
IndentGotoLabels: false
14+
15+
BreakBeforeBraces: Linux
16+
AlignAfterOpenBracket: Align
17+
AlignConsecutiveAssignments:
18+
Enabled: true
19+
AcrossEmptyLines: false
20+
AcrossComments: true
21+
22+
SortIncludes: true
23+
IncludeBlocks: Regroup
24+
IncludeCategories:
25+
- Regex: 'vmlinux.h'
26+
Priority: -1
27+
- Regex: '^<.*\.h>'
28+
Priority: 1
29+
- Regex: '^".*\.h'
30+
Priority: 2
31+
32+
ColumnLimit: 80
33+
PenaltyReturnTypeOnItsOwnLine: 10
34+
BreakAfterReturnType: Automatic
35+
BinPackParameters: true
36+
AllowAllArgumentsOnNextLine: false

0 commit comments

Comments
 (0)