ncnn
/
.clang-format
132 строки · 3.7 Кб
1# find src/ tools/ tests/ examples/ benchmark/ -type f -name '*.c' -o -name '*.cpp' -o -name '*.h' | xargs -i clang-format -i {}
2
3# need clang-format >= 10.0
4
5AccessModifierOffset: -4
6AlignAfterOpenBracket: Align
7AlignConsecutiveAssignments: false
8# AlignConsecutiveBitFields: true
9AlignConsecutiveDeclarations: false
10AlignConsecutiveMacros: true
11AlignEscapedNewlines: Left
12# AlignOperands: AlignAfterOperator
13AlignTrailingComments: true
14AllowAllArgumentsOnNextLine: true
15AllowAllConstructorInitializersOnNextLine: true
16AllowAllParametersOfDeclarationOnNextLine: true
17AllowShortBlocksOnASingleLine: Always
18AllowShortCaseLabelsOnASingleLine: true
19# AllowShortEnumsOnASingleLine: true
20AllowShortFunctionsOnASingleLine: None
21AllowShortIfStatementsOnASingleLine: WithoutElse
22AllowShortLambdasOnASingleLine: All
23AllowShortLoopsOnASingleLine: true
24AlwaysBreakAfterReturnType: None
25AlwaysBreakBeforeMultilineStrings: false
26AlwaysBreakTemplateDeclarations: Yes
27BinPackArguments: true
28BinPackParameters: true
29BraceWrapping:
30AfterCaseLabel: true
31AfterClass: true
32AfterControlStatement: Always
33AfterEnum: true
34AfterFunction: true
35AfterNamespace: false
36AfterObjCDeclaration: false
37AfterStruct: true
38AfterUnion: true
39AfterExternBlock: false
40BeforeCatch: true
41BeforeElse: true
42# BeforeLambdaBody: false
43# BeforeWhile: false
44IndentBraces: false
45SplitEmptyFunction: true
46SplitEmptyRecord: true
47SplitEmptyNamespace: false
48BreakAfterJavaFieldAnnotations: true
49BreakBeforeBinaryOperators: All
50BreakBeforeBraces: Custom
51BreakBeforeTernaryOperators: true
52BreakConstructorInitializers: BeforeColon
53BreakInheritanceList: BeforeColon
54BreakStringLiterals: false
55ColumnLimit: 0
56# CommentPragmas:
57CompactNamespaces: false
58ConstructorInitializerAllOnOneLineOrOnePerLine: true
59ConstructorInitializerIndentWidth: 4
60ContinuationIndentWidth: 4
61Cpp11BracedListStyle: true
62DeriveLineEnding: false
63DerivePointerAlignment: false
64# DisableFormat:
65# ExperimentalAutoDetectBinPacking:
66FixNamespaceComments: true
67# ForEachMacros:
68IncludeBlocks: Regroup
69# IncludeCategories:
70# IncludeIsMainRegex:
71# IncludeIsMainSourceRegex:
72# IndentCaseBlocks: false
73IndentCaseLabels: false
74# IndentExternBlock: NoIndent
75IndentGotoLabels: false
76IndentPPDirectives: None
77IndentWidth: 4
78# IndentWrappedFunctionNames: 4
79# InsertTrailingCommas: None
80# JavaImportGroups:
81# JavaScriptQuotes
82# JavaScriptWrapImports:
83KeepEmptyLinesAtTheStartOfBlocks: false
84Language: Cpp
85# MacroBlockBegin:
86# MacroBlockEnd:
87MaxEmptyLinesToKeep: 1
88NamespaceIndentation: None
89# NamespaceMacros:
90# ObjCBinPackProtocolList:
91# ObjCBlockIndentWidth:
92# ObjCBreakBeforeNestedBlockParam:
93# ObjCSpaceAfterProperty:
94# ObjCSpaceBeforeProtocolList:
95# PenaltyBreakAssignment:
96# PenaltyBreakBeforeFirstCallParameter:
97# PenaltyBreakComment:
98# PenaltyBreakFirstLessLess:
99# PenaltyBreakString:
100# PenaltyBreakTemplateDeclaration:
101# PenaltyExcessCharacter:
102# PenaltyReturnTypeOnItsOwnLine:
103PointerAlignment: Left
104# RawStringFormats:
105ReflowComments: false
106SortIncludes: false
107SortUsingDeclarations: true
108SpaceAfterCStyleCast: false
109SpaceAfterLogicalNot: false
110SpaceAfterTemplateKeyword: false
111SpaceBeforeAssignmentOperators: true
112SpaceBeforeCpp11BracedList: false
113SpaceBeforeCtorInitializerColon: true
114SpaceBeforeInheritanceColon: true
115SpaceBeforeParens: ControlStatements
116SpaceBeforeRangeBasedForLoopColon: true
117SpaceBeforeSquareBrackets: false
118SpaceInEmptyBlock: false
119SpaceInEmptyParentheses: false
120SpacesBeforeTrailingComments: 1
121SpacesInAngles: false
122SpacesInCStyleCastParentheses: false
123SpacesInConditionalStatement: false
124SpacesInContainerLiterals: false
125SpacesInParentheses: false
126SpacesInSquareBrackets: false
127Standard: c++03
128#StatementMacros:
129TabWidth: 4
130# TypenameMacros:
131UseCRLF: false
132UseTab: Never
133