| 1 |
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
| 2 |
# |
| 3 |
# This program is free software; you can redistribute it and/or modify |
| 4 |
# it under the terms of the GNU General Public License, version 2.0, |
| 5 |
# as published by the Free Software Foundation. |
| 6 |
# |
| 7 |
# This program is also distributed with certain software (including |
| 8 |
# but not limited to OpenSSL) that is licensed under separate terms, |
| 9 |
# as designated in a particular file or component or in included license |
| 10 |
# documentation. The authors of MySQL hereby grant you an additional |
| 11 |
# permission to link the program and your derivative works with the |
| 12 |
# separately licensed software that they have included with MySQL. |
| 13 |
# |
| 14 |
# This program is distributed in the hope that it will be useful, |
| 15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
# GNU General Public License, version 2.0, for more details. |
| 18 |
# |
| 19 |
# You should have received a copy of the GNU General Public License |
| 20 |
# along with this program; if not, write to the Free Software |
| 21 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 |
|
| 23 |
# This is the output of clang-format-5.0 --style=google --dump-config, |
| 24 |
# except for changes mentioned below. We lock the style so that any newer |
| 25 |
# version of clang-format will give the same result; as time goes, we may |
| 26 |
# update this list, requiring newer versions of clang-format. |
| 27 |
|
| 28 |
Language: Cpp |
| 29 |
# BasedOnStyle: Google |
| 30 |
AccessModifierOffset: -1 |
| 31 |
AlignAfterOpenBracket: Align |
| 32 |
AlignConsecutiveAssignments: false |
| 33 |
AlignConsecutiveDeclarations: false |
| 34 |
AlignEscapedNewlines: Left |
| 35 |
AlignOperands: true |
| 36 |
AlignTrailingComments: true |
| 37 |
AllowAllParametersOfDeclarationOnNextLine: true |
| 38 |
AllowShortBlocksOnASingleLine: false |
| 39 |
AllowShortCaseLabelsOnASingleLine: false |
| 40 |
AllowShortFunctionsOnASingleLine: All |
| 41 |
AllowShortIfStatementsOnASingleLine: true |
| 42 |
AllowShortLoopsOnASingleLine: true |
| 43 |
AlwaysBreakAfterDefinitionReturnType: None |
| 44 |
AlwaysBreakAfterReturnType: None |
| 45 |
AlwaysBreakBeforeMultilineStrings: true |
| 46 |
AlwaysBreakTemplateDeclarations: true |
| 47 |
BinPackArguments: true |
| 48 |
BinPackParameters: true |
| 49 |
BraceWrapping: |
| 50 |
AfterClass: false |
| 51 |
AfterControlStatement: false |
| 52 |
AfterEnum: false |
| 53 |
AfterFunction: false |
| 54 |
AfterNamespace: false |
| 55 |
AfterObjCDeclaration: false |
| 56 |
AfterStruct: false |
| 57 |
AfterUnion: false |
| 58 |
BeforeCatch: false |
| 59 |
BeforeElse: false |
| 60 |
IndentBraces: false |
| 61 |
SplitEmptyFunction: true |
| 62 |
SplitEmptyRecord: true |
| 63 |
SplitEmptyNamespace: true |
| 64 |
BreakBeforeBinaryOperators: None |
| 65 |
BreakBeforeBraces: Attach |
| 66 |
BreakBeforeInheritanceComma: false |
| 67 |
BreakBeforeTernaryOperators: true |
| 68 |
BreakConstructorInitializersBeforeComma: false |
| 69 |
BreakConstructorInitializers: BeforeColon |
| 70 |
BreakAfterJavaFieldAnnotations: false |
| 71 |
BreakStringLiterals: true |
| 72 |
ColumnLimit: 80 |
| 73 |
CommentPragmas: '^ IWYU pragma:' |
| 74 |
CompactNamespaces: false |
| 75 |
ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 76 |
ConstructorInitializerIndentWidth: 4 |
| 77 |
ContinuationIndentWidth: 4 |
| 78 |
Cpp11BracedListStyle: true |
| 79 |
DisableFormat: false |
| 80 |
ExperimentalAutoDetectBinPacking: false |
| 81 |
FixNamespaceComments: true |
| 82 |
ForEachMacros: |
| 83 |
- foreach |
| 84 |
- Q_FOREACH |
| 85 |
- BOOST_FOREACH |
| 86 |
IncludeCategories: |
| 87 |
- Regex: '^<.*\.h>' |
| 88 |
Priority: 1 |
| 89 |
- Regex: '^<.*' |
| 90 |
Priority: 2 |
| 91 |
- Regex: '.*' |
| 92 |
Priority: 3 |
| 93 |
IncludeIsMainRegex: '([-_](test|unittest))?$' |
| 94 |
IndentCaseLabels: true |
| 95 |
IndentWidth: 2 |
| 96 |
IndentWrappedFunctionNames: false |
| 97 |
JavaScriptQuotes: Leave |
| 98 |
JavaScriptWrapImports: true |
| 99 |
KeepEmptyLinesAtTheStartOfBlocks: false |
| 100 |
MacroBlockBegin: '' |
| 101 |
MacroBlockEnd: '' |
| 102 |
MaxEmptyLinesToKeep: 1 |
| 103 |
NamespaceIndentation: None |
| 104 |
ObjCBlockIndentWidth: 2 |
| 105 |
ObjCSpaceAfterProperty: false |
| 106 |
ObjCSpaceBeforeProtocolList: false |
| 107 |
PenaltyBreakAssignment: 2 |
| 108 |
PenaltyBreakBeforeFirstCallParameter: 1 |
| 109 |
PenaltyBreakComment: 300 |
| 110 |
PenaltyBreakFirstLessLess: 120 |
| 111 |
PenaltyBreakString: 1000 |
| 112 |
PenaltyExcessCharacter: 1000000 |
| 113 |
PenaltyReturnTypeOnItsOwnLine: 200 |
| 114 |
ReflowComments: true |
| 115 |
SortIncludes: true |
| 116 |
SortUsingDeclarations: true |
| 117 |
SpaceAfterCStyleCast: false |
| 118 |
SpaceAfterTemplateKeyword: true |
| 119 |
SpaceBeforeAssignmentOperators: true |
| 120 |
SpaceBeforeParens: ControlStatements |
| 121 |
SpaceInEmptyParentheses: false |
| 122 |
SpacesBeforeTrailingComments: 2 |
| 123 |
SpacesInAngles: false |
| 124 |
SpacesInContainerLiterals: true |
| 125 |
SpacesInCStyleCastParentheses: false |
| 126 |
SpacesInParentheses: false |
| 127 |
SpacesInSquareBrackets: false |
| 128 |
TabWidth: 8 |
| 129 |
UseTab: Never |
| 130 |
|
| 131 |
# We declare one specific pointer style since right alignment is dominant in |
| 132 |
# the MySQL code base (default --style=google has DerivePointerAlignment true). |
| 133 |
DerivePointerAlignment: false |
| 134 |
PointerAlignment: Right |
| 135 |
|
| 136 |
# MySQL source code is allowed to use C++11 features. |
| 137 |
Standard: Cpp11 |