cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
.clang-format
103lines · modecode
| 1 | --- |
| 2 | BasedOnStyle: WebKit |
| 3 | Language: Cpp |
| 4 | AlignAfterOpenBracket: false |
| 5 | BreakBeforeBraces: Custom |
| 6 | BraceWrapping: { |
| 7 | AfterClass: 'true' |
| 8 | AfterControlStatement: 'true' |
| 9 | AfterEnum : 'true' |
| 10 | AfterFunction : 'true' |
| 11 | AfterNamespace : 'true' |
| 12 | AfterStruct : 'true' |
| 13 | AfterUnion : 'true' |
| 14 | BeforeCatch : 'true' |
| 15 | BeforeElse : 'true' |
| 16 | IndentBraces : 'false' |
| 17 | } |
| 18 | |
| 19 | BreakConstructorInitializersBeforeComma: false |
| 20 | Cpp11BracedListStyle: true |
| 21 | ColumnLimit: 140 |
| 22 | ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 23 | ExperimentalAutoDetectBinPacking: true |
| 24 | UseTab: Never |
| 25 | TabWidth: 4 |
| 26 | IndentWidth: 4 |
| 27 | Standard: Cpp11 |
| 28 | PointerAlignment: Middle |
| 29 | MaxEmptyLinesToKeep: 2 |
| 30 | KeepEmptyLinesAtTheStartOfBlocks: false |
| 31 | #AllowShortFunctionsOnASingleLine: Inline |
| 32 | AllowShortFunctionsOnASingleLine: Empty |
| 33 | AlwaysBreakTemplateDeclarations: true |
| 34 | IndentCaseLabels: true |
| 35 | #SpaceAfterTemplateKeyword: true |
| 36 | SortIncludes: true |
| 37 | IncludeCategories: |
| 38 | - Regex: '^<[a-z_]+>' |
| 39 | Priority: 1 |
| 40 | - Regex: '^<[a-z_]+.h>' |
| 41 | Priority: 2 |
| 42 | - Regex: '^["<](common|ext|mysqlxx|daemon|zkutil)/' |
| 43 | Priority: 90 |
| 44 | - Regex: '^["<](DB)/' |
| 45 | Priority: 100 |
| 46 | - Regex: '^["<](Poco)/' |
| 47 | Priority: 50 |
| 48 | - Regex: '^"' |
| 49 | Priority: 110 |
| 50 | - Regex: '/' |
| 51 | Priority: 30 |
| 52 | - Regex: '.*' |
| 53 | Priority: 40 |
| 54 | ReflowComments: false |
| 55 | AlignEscapedNewlinesLeft: true |
| 56 | |
| 57 | # Not changed: |
| 58 | AccessModifierOffset: -4 |
| 59 | AlignConsecutiveAssignments: false |
| 60 | AlignOperands: false |
| 61 | AlignTrailingComments: false |
| 62 | AllowAllParametersOfDeclarationOnNextLine: true |
| 63 | AllowShortBlocksOnASingleLine: false |
| 64 | AllowShortCaseLabelsOnASingleLine: false |
| 65 | AllowShortIfStatementsOnASingleLine: false |
| 66 | AllowShortLoopsOnASingleLine: false |
| 67 | AlwaysBreakAfterDefinitionReturnType: None |
| 68 | AlwaysBreakBeforeMultilineStrings: false |
| 69 | BinPackArguments: false |
| 70 | BinPackParameters: false |
| 71 | BreakBeforeBinaryOperators: All |
| 72 | BreakBeforeTernaryOperators: true |
| 73 | CommentPragmas: '^ IWYU pragma:' |
| 74 | ConstructorInitializerIndentWidth: 4 |
| 75 | ContinuationIndentWidth: 4 |
| 76 | DerivePointerAlignment: false |
| 77 | DisableFormat: false |
| 78 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] |
| 79 | IndentWidth: 4 |
| 80 | IndentWrappedFunctionNames: false |
| 81 | MacroBlockBegin: '' |
| 82 | MacroBlockEnd: '' |
| 83 | NamespaceIndentation: Inner |
| 84 | ObjCBlockIndentWidth: 4 |
| 85 | ObjCSpaceAfterProperty: true |
| 86 | ObjCSpaceBeforeProtocolList: true |
| 87 | PenaltyBreakBeforeFirstCallParameter: 19 |
| 88 | PenaltyBreakComment: 300 |
| 89 | PenaltyBreakFirstLessLess: 120 |
| 90 | PenaltyBreakString: 1000 |
| 91 | PenaltyExcessCharacter: 1000000 |
| 92 | PenaltyReturnTypeOnItsOwnLine: 60 |
| 93 | SpaceAfterCStyleCast: false |
| 94 | SpaceBeforeAssignmentOperators: true |
| 95 | SpaceBeforeParens: ControlStatements |
| 96 | SpaceInEmptyParentheses: false |
| 97 | SpacesBeforeTrailingComments: 1 |
| 98 | SpacesInContainerLiterals: true |
| 99 | SpacesInCStyleCastParentheses: false |
| 100 | SpacesInParentheses: false |
| 101 | SpacesInSquareBrackets: false |
| 102 | ... |