deepspeed
/
.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: Cpp5# BasedOnStyle: Google
6AccessModifierOffset: -47AlignAfterOpenBracket: Align8AlignConsecutiveAssignments: false9AlignConsecutiveDeclarations: false10AlignEscapedNewlines: Left11AlignOperands: true12AlignTrailingComments: true13AllowAllParametersOfDeclarationOnNextLine: false14AllowShortBlocksOnASingleLine: true15AllowShortCaseLabelsOnASingleLine: true16AllowShortFunctionsOnASingleLine: All17AllowShortIfStatementsOnASingleLine: true18AllowShortLoopsOnASingleLine: true19# This is deprecated
20AlwaysBreakAfterDefinitionReturnType: None21AlwaysBreakAfterReturnType: None22AlwaysBreakBeforeMultilineStrings: true23AlwaysBreakTemplateDeclarations: true24BinPackArguments: false25BinPackParameters: false26BraceWrapping:27AfterClass: false28AfterControlStatement: false29AfterEnum: false30AfterFunction: false31AfterNamespace: false32AfterObjCDeclaration: false33AfterStruct: false34AfterUnion: false35AfterExternBlock: false36BeforeCatch: false37BeforeElse: false38IndentBraces: false39# disabling the below splits, else, they'll just add to the vertical length of source files!40SplitEmptyFunction: false41SplitEmptyRecord: false42SplitEmptyNamespace: false43BreakBeforeBinaryOperators: None44BreakBeforeBraces: WebKit45BreakBeforeInheritanceComma: false46BreakInheritanceList: BeforeColon47BreakBeforeTernaryOperators: true48BreakConstructorInitializersBeforeComma: false49BreakConstructorInitializers: BeforeColon50BreakAfterJavaFieldAnnotations: false51BreakStringLiterals: true52ColumnLimit: 10053CommentPragmas: '^ IWYU pragma:'54CompactNamespaces: false55ConstructorInitializerAllOnOneLineOrOnePerLine: true56# Kept the below 2 to be the same as `IndentWidth` to keep everything uniform
57ConstructorInitializerIndentWidth: 458ContinuationIndentWidth: 459Cpp11BracedListStyle: true60DerivePointerAlignment: false61DisableFormat: false62ExperimentalAutoDetectBinPacking: false63FixNamespaceComments: true64ForEachMacros:65- foreach66- Q_FOREACH67- BOOST_FOREACH68IncludeBlocks: Preserve69IncludeCategories:70- Regex: '^<ext/.*\.h>'71Priority: 272- Regex: '^<.*\.h>'73Priority: 174- Regex: '^<.*'75Priority: 276- Regex: '.*'77Priority: 378IncludeIsMainRegex: '([-_](test|unittest))?$'79IndentCaseLabels: true80IndentPPDirectives: None81IndentWidth: 482IndentWrappedFunctionNames: false83JavaScriptQuotes: Leave84JavaScriptWrapImports: true85KeepEmptyLinesAtTheStartOfBlocks: false86MacroBlockBegin: ''87MacroBlockEnd: ''88MaxEmptyLinesToKeep: 189NamespaceIndentation: None90ObjCBinPackProtocolList: Never91ObjCBlockIndentWidth: 492ObjCSpaceAfterProperty: false93ObjCSpaceBeforeProtocolList: true94PenaltyBreakAssignment: 495PenaltyBreakBeforeFirstCallParameter: 196PenaltyBreakComment: 30097PenaltyBreakFirstLessLess: 12098PenaltyBreakString: 100099PenaltyBreakTemplateDeclaration: 10100PenaltyExcessCharacter: 1000000101PenaltyReturnTypeOnItsOwnLine: 200102PointerAlignment: Left103RawStringFormats:104- Language: Cpp105Delimiters:106- cc107- CC108- cpp109- Cpp110- CPP111- 'c++'112- 'C++'113CanonicalDelimiter: ''114- Language: TextProto115Delimiters:116- pb117- PB118- proto119- PROTO120EnclosingFunctions:121- EqualsProto122- EquivToProto123- PARSE_PARTIAL_TEXT_PROTO124- PARSE_TEST_PROTO125- PARSE_TEXT_PROTO126- ParseTextOrDie127- ParseTextProtoOrDie128CanonicalDelimiter: ''129BasedOnStyle: google130# Enabling comment reflow causes doxygen comments to be messed up in their formats!
131ReflowComments: true132SortIncludes: true133SortUsingDeclarations: true134SpaceAfterCStyleCast: false135SpaceAfterTemplateKeyword: true136SpaceBeforeAssignmentOperators: true137SpaceBeforeCpp11BracedList: false138SpaceBeforeCtorInitializerColon: true139SpaceBeforeInheritanceColon: true140SpaceBeforeParens: ControlStatements141SpaceBeforeRangeBasedForLoopColon: true142SpaceInEmptyParentheses: false143SpacesBeforeTrailingComments: 2144SpacesInAngles: false145SpacesInContainerLiterals: true146SpacesInCStyleCastParentheses: false147SpacesInParentheses: false148SpacesInSquareBrackets: false149Standard: Cpp11150StatementMacros:151- Q_UNUSED152- QT_REQUIRE_VERSION153# Be consistent with indent-width, even for people who use tab for indentation!
154TabWidth: 4155UseTab: Never156