gpt-neox
/
.clang-format
155 строк · 4.4 Кб
1---
2# Refer to the following link for the explanation of each params:
3# http://releases.llvm.org/8.0.0/tools/clang/docs/ClangFormatStyleOptions.html
4Language: Cpp
5# BasedOnStyle: Google
6AccessModifierOffset: -4
7AlignAfterOpenBracket: Align
8AlignConsecutiveAssignments: false
9AlignConsecutiveDeclarations: false
10AlignEscapedNewlines: Left
11AlignOperands: true
12AlignTrailingComments: true
13AllowAllParametersOfDeclarationOnNextLine: false
14AllowShortBlocksOnASingleLine: true
15AllowShortCaseLabelsOnASingleLine: true
16AllowShortFunctionsOnASingleLine: All
17AllowShortIfStatementsOnASingleLine: true
18AllowShortLoopsOnASingleLine: true
19# This is deprecated
20AlwaysBreakAfterDefinitionReturnType: None
21AlwaysBreakAfterReturnType: None
22AlwaysBreakBeforeMultilineStrings: true
23AlwaysBreakTemplateDeclarations: true
24BinPackArguments: false
25BinPackParameters: false
26BraceWrapping:
27AfterClass: false
28AfterControlStatement: false
29AfterEnum: false
30AfterFunction: false
31AfterNamespace: false
32AfterObjCDeclaration: false
33AfterStruct: false
34AfterUnion: false
35AfterExternBlock: false
36BeforeCatch: false
37BeforeElse: false
38IndentBraces: false
39# disabling the below splits, else, they'll just add to the vertical length of source files!
40SplitEmptyFunction: false
41SplitEmptyRecord: false
42SplitEmptyNamespace: false
43BreakBeforeBinaryOperators: None
44BreakBeforeBraces: WebKit
45BreakBeforeInheritanceComma: false
46BreakInheritanceList: BeforeColon
47BreakBeforeTernaryOperators: true
48BreakConstructorInitializersBeforeComma: false
49BreakConstructorInitializers: BeforeColon
50BreakAfterJavaFieldAnnotations: false
51BreakStringLiterals: true
52ColumnLimit: 100
53CommentPragmas: '^ IWYU pragma:'
54CompactNamespaces: false
55ConstructorInitializerAllOnOneLineOrOnePerLine: true
56# Kept the below 2 to be the same as `IndentWidth` to keep everything uniform
57ConstructorInitializerIndentWidth: 4
58ContinuationIndentWidth: 4
59Cpp11BracedListStyle: true
60DerivePointerAlignment: false
61DisableFormat: false
62ExperimentalAutoDetectBinPacking: false
63FixNamespaceComments: true
64ForEachMacros:
65- foreach
66- Q_FOREACH
67- BOOST_FOREACH
68IncludeBlocks: Preserve
69IncludeCategories:
70- Regex: '^<ext/.*\.h>'
71Priority: 2
72- Regex: '^<.*\.h>'
73Priority: 1
74- Regex: '^<.*'
75Priority: 2
76- Regex: '.*'
77Priority: 3
78IncludeIsMainRegex: '([-_](test|unittest))?$'
79IndentCaseLabels: true
80IndentPPDirectives: None
81IndentWidth: 4
82IndentWrappedFunctionNames: false
83JavaScriptQuotes: Leave
84JavaScriptWrapImports: true
85KeepEmptyLinesAtTheStartOfBlocks: false
86MacroBlockBegin: ''
87MacroBlockEnd: ''
88MaxEmptyLinesToKeep: 1
89NamespaceIndentation: None
90ObjCBinPackProtocolList: Never
91ObjCBlockIndentWidth: 4
92ObjCSpaceAfterProperty: false
93ObjCSpaceBeforeProtocolList: true
94PenaltyBreakAssignment: 4
95PenaltyBreakBeforeFirstCallParameter: 1
96PenaltyBreakComment: 300
97PenaltyBreakFirstLessLess: 120
98PenaltyBreakString: 1000
99PenaltyBreakTemplateDeclaration: 10
100PenaltyExcessCharacter: 1000000
101PenaltyReturnTypeOnItsOwnLine: 200
102PointerAlignment: Left
103RawStringFormats:
104- Language: Cpp
105Delimiters:
106- cc
107- CC
108- cpp
109- Cpp
110- CPP
111- 'c++'
112- 'C++'
113CanonicalDelimiter: ''
114- Language: TextProto
115Delimiters:
116- pb
117- PB
118- proto
119- PROTO
120EnclosingFunctions:
121- EqualsProto
122- EquivToProto
123- PARSE_PARTIAL_TEXT_PROTO
124- PARSE_TEST_PROTO
125- PARSE_TEXT_PROTO
126- ParseTextOrDie
127- ParseTextProtoOrDie
128CanonicalDelimiter: ''
129BasedOnStyle: google
130# Enabling comment reflow causes doxygen comments to be messed up in their formats!
131ReflowComments: true
132SortIncludes: true
133SortUsingDeclarations: true
134SpaceAfterCStyleCast: false
135SpaceAfterTemplateKeyword: true
136SpaceBeforeAssignmentOperators: true
137SpaceBeforeCpp11BracedList: false
138SpaceBeforeCtorInitializerColon: true
139SpaceBeforeInheritanceColon: true
140SpaceBeforeParens: ControlStatements
141SpaceBeforeRangeBasedForLoopColon: true
142SpaceInEmptyParentheses: false
143SpacesBeforeTrailingComments: 2
144SpacesInAngles: false
145SpacesInContainerLiterals: true
146SpacesInCStyleCastParentheses: false
147SpacesInParentheses: false
148SpacesInSquareBrackets: false
149Standard: Cpp11
150StatementMacros:
151- Q_UNUSED
152- QT_REQUIRE_VERSION
153# Be consistent with indent-width, even for people who use tab for indentation!
154TabWidth: 4
155UseTab: Never
156