blob: 46d1fb6dcec141c2b70aab7a75b144b418651d92 (
plain) (
blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
Language: Cpp
Standard: c++17
UseTab: ForContinuationAndIndentation
TabWidth: 4
IndentWidth: 4
ColumnLimit: 80
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 0
NamespaceIndentation: All
CompactNamespaces: true
FixNamespaceComments: true
IndentAccessModifiers: false
AccessModifierOffset: -4
IndentCaseLabels: true
BreakBeforeBraces: Allman
BreakBeforeBinaryOperators: All
BreakConstructorInitializers: BeforeComma
# Currentline doesn't work
# PackConstructorInitializers: CurrentLine >= 14
BreakStringLiterals: false
# Multiline does not work in clang-format 13
# AlwaysBreakTemplateDeclarations: MultiLine
AlwaysBreakTemplateDeclarations: Yes
# AfterComma does not work <= 13
#BreakInheritanceList: AfterComma
#BreakInheritanceList: BeforeComma
#BreakInheritanceList: false
SpaceBeforeInheritanceColon: true
#AlignAfterOpenBracket: DontAlign
AlignAfterOpenBracket: Align
PointerAlignment: Right
SpacesInAngles: false
SpaceBeforeAssignmentOperators: true
AlignConsecutiveDeclarations: true
AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
PenaltyBreakComment: 1
PenaltyBreakAssignment: 1000
AlwaysBreakBeforeMultilineStrings: true
PenaltyReturnTypeOnItsOwnLine: 1
# SortIncludes: CaseSensitive # >= 13!
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^(("|"../)core)/'
Priority: 20
- Regex: '^(("|"../)analog)/'
Priority: 21
- Regex: '^(("|"../)devices)/'
Priority: 22
- Regex: '^(("|"../)solver)/'
Priority: 23
- Regex: '^(("|"../)plib)/'
Priority: 30
- Regex: '<[([:alnum:]|_).]+>'
Priority: 40
- Regex: '.*'
Priority: 10
StatementMacros:
- "NETLIB_DEVICE_IMPL_NS"
- "TTL_7400_NAND"
- "TTL_7402_NOR"
- "NET_C"
- "TRUTHTABLE_ENTRY"
- "LOCAL_LIB_ENTRY"
- "TT_HEAD"
- "TT_LINE"
- "TT_FAMILY"
- "DIPPINS"
#StatementAttributeLikeMacros:
# - "NETLIST_NAME"
# - "NETLIB_NAME"
TypenameMacros:
- "NETLIST_NAME"
- "NETLIB_NAME"
IndentPPDirectives: BeforeHash
MacroBlockBegin: "^static NETLIST_START\\(.*\\)|static TRUTHTABLE_START\\(.*\\)$"
MacroBlockEnd: "^NETLIST_END\\(\\)|TRUTHTABLE_END\\(\\)$"
# ReferenceAlignment: Middle
# Avoid formatting (breaking) doxygen
CommentPragmas: '^\\.+'
# Avoid formatting cspell ignored comments
CommentPragmas: '^#.+'
# Avoid breaking tables
CommentPragmas: '^\|.+'
# Avoid breaking clang-tidy
CommentPragmas: '^ NOLINT.+'
|