forked from open62541pp/open62541pp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
44 lines (42 loc) · 1.6 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
40
41
42
43
44
---
# Documentation: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# LLVM defaults: https://github.com/llvm/llvm-project/blob/release/19.x/clang/lib/Format/Format.cpp#L1412-L1630
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent # version >= 14 required
# AlignConsecutiveAssignments: true
# AlignConsecutiveDeclarations: true
AlignOperands: DontAlign
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortFunctionsOnASingleLine: Empty
AlignTrailingComments: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakAfterAttributes: Leave
ColumnLimit: 100
FixNamespaceComments: true
IndentWidth: 4
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: Wrapped # currently only available for JavaScript
Language: Cpp
PackConstructorInitializers: Never
PointerAlignment: Left
QualifierAlignment: Custom # v14
QualifierOrder: [friend, inline, static, constexpr, const, volatile, type] # v14
ReferenceAlignment: Left
SeparateDefinitionBlocks: Always # v14
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
PenaltyBreakScopeResolution: 1000 # default: 500; v18
PenaltyBreakString: 1000 # default: 1000
PenaltyBreakTemplateDeclaration: 0 # default: ?
PenaltyExcessCharacter: 1000000 # default: 1000000
PenaltyIndentedWhitespace: 5 # default: 0
PenaltyReturnTypeOnItsOwnLine: 200 # default: 60