Verilator
/
.clang-format
125 строк · 3.6 Кб
1---
2Language: Cpp
3# BasedOnStyle: LLVM
4AccessModifierOffset: -4
5AlignAfterOpenBracket: Align
6AlignConsecutiveAssignments: false
7AlignConsecutiveDeclarations: false
8AlignEscapedNewlines: DontAlign
9AlignOperands: true
10AlignTrailingComments: false
11AllowAllParametersOfDeclarationOnNextLine: true
12AllowShortBlocksOnASingleLine: true
13AllowShortCaseLabelsOnASingleLine: true
14AllowShortFunctionsOnASingleLine: All
15AllowShortIfStatementsOnASingleLine: true
16AllowShortLoopsOnASingleLine: true
17AlwaysBreakAfterDefinitionReturnType: None
18AlwaysBreakAfterReturnType: None
19AlwaysBreakBeforeMultilineStrings: false
20AlwaysBreakTemplateDeclarations: true
21BinPackArguments: true
22BinPackParameters: true
23BraceWrapping:
24AfterClass: false
25AfterControlStatement: false
26AfterEnum: false
27AfterFunction: false
28AfterNamespace: false
29AfterObjCDeclaration: false
30AfterStruct: false
31AfterUnion: false
32AfterExternBlock: false
33BeforeCatch: false
34BeforeElse: false
35IndentBraces: false
36SplitEmptyFunction: true
37SplitEmptyRecord: true
38SplitEmptyNamespace: true
39BreakBeforeBinaryOperators: All
40BreakBeforeBraces: Attach
41BreakBeforeInheritanceComma: false
42BreakBeforeTernaryOperators: true
43BreakConstructorInitializersBeforeComma: false
44BreakConstructorInitializers: BeforeComma
45BreakAfterJavaFieldAnnotations: false
46BreakStringLiterals: true
47ColumnLimit: 99
48CommentPragmas: '^ IWYU pragma:'
49CompactNamespaces: false
50ConstructorInitializerAllOnOneLineOrOnePerLine: false
51ConstructorInitializerIndentWidth: 4
52ContinuationIndentWidth: 4
53Cpp11BracedListStyle: true
54DerivePointerAlignment: false
55DisableFormat: false
56ExperimentalAutoDetectBinPacking: false
57FixNamespaceComments: true
58ForEachMacros:
59- Q_FOREACH
60- BOOST_FOREACH
61
62# Include grouping/sorting
63SortIncludes: true
64IncludeBlocks: Regroup
65IncludeCategories:
66- Regex: '"V3Pch.*\.h"'
67Priority: -2 # Precompiled headers
68- Regex: '"(config_build|verilated_config|verilatedos)\.h"'
69Priority: -1 # Sepecials before main header
70- Regex: '(<|")verilated.*'
71Priority: 1 # Runtime headers
72- Regex: '"V3.*__gen.*\.h"'
73Priority: 3 # Generated internal headers separately
74- Regex: '"V3.*"'
75Priority: 2 # Internal header
76- Regex: '".*"'
77Priority: 4 # Other non-system headers
78- Regex: '<[[:alnum:]_.]+>'
79Priority: 5 # Simple system headers next
80- Regex: '<.*>'
81Priority: 6 # Other system headers next
82IncludeIsMainRegex: '$'
83
84IndentCaseLabels: false
85IndentPPDirectives: None
86IndentWidth: 4
87IndentWrappedFunctionNames: false
88JavaScriptQuotes: Leave
89JavaScriptWrapImports: true
90KeepEmptyLinesAtTheStartOfBlocks: true
91MacroBlockBegin: ''
92MacroBlockEnd: ''
93MaxEmptyLinesToKeep: 1
94NamespaceIndentation: None
95ObjCBlockIndentWidth: 2
96ObjCSpaceAfterProperty: false
97ObjCSpaceBeforeProtocolList: true
98PenaltyBreakAssignment: 2
99PenaltyBreakBeforeFirstCallParameter: 19
100PenaltyBreakComment: 300
101PenaltyBreakFirstLessLess: 120
102PenaltyBreakString: 1000
103PenaltyExcessCharacter: 1000000
104PenaltyReturnTypeOnItsOwnLine: 60
105PointerAlignment: Left
106ReflowComments: true
107SortUsingDeclarations: true
108SpaceAfterCStyleCast: false
109SpaceAfterTemplateKeyword: true
110SpaceBeforeAssignmentOperators: true
111SpaceBeforeParens: ControlStatements
112SpaceInEmptyParentheses: false
113SpacesBeforeTrailingComments: 2
114SpacesInAngles: false
115SpacesInContainerLiterals: true
116SpacesInCStyleCastParentheses: false
117SpacesInLineCommentPrefix:
118Minimum: 0
119Maximum: -1
120SpacesInParentheses: false
121SpacesInSquareBrackets: false
122Standard: Cpp11
123TabWidth: 8
124UseTab: Never
125...
126