forked from open62541pp/open62541pp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-format
39 lines (37 loc) · 1.38 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
# Documentation: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# LLVM defaults: https://github.com/llvm/llvm-project/blob/main/clang/lib/Format/Format.cpp#L1248
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent # version >= 14 required
# AlignConsecutiveAssignments: true
# AlignConsecutiveDeclarations: true
AlignTrailingComments: false
AllowShortFunctionsOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakAfterAttributes: Leave
ColumnLimit: 100
FixNamespaceComments: true
IndentWidth: 4
InsertBraces: true
InsertTrailingCommas: Wrapped # currently only available for JavaScript
Language: Cpp
PackConstructorInitializers: Never
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Left
SeparateDefinitionBlocks: Always # version >= 14 required
SpacesBeforeTrailingComments: 2
# Adjust penalties to prefer break after open bracket
PenaltyBreakAssignment: 100 # default: ?
PenaltyBreakBeforeFirstCallParameter: 0 # default: 19
PenaltyBreakComment: 300 # default: 300
PenaltyBreakFirstLessLess: 0 # default: 120
PenaltyBreakOpenParenthesis: 0 # default: 0
PenaltyBreakString: 1000 # default: 1000
PenaltyBreakTemplateDeclaration: 0 # default: ?
PenaltyExcessCharacter: 1000000 # default: 1000000
PenaltyIndentedWhitespace: 5 # default: 0
PenaltyReturnTypeOnItsOwnLine: 200 # default: 60