| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 --- | 1 --- |
| 2 Language: Cpp | 2 # The syntax herein is for Clang 4, with opt-in support for Clang 5. |
| 3 AccessModifierOffset: -2 | 3 |
|
sergei
2017/09/08 15:10:44
I think we should add
AlignAfterOpenBracket: DontA
Eric
2017/09/08 15:48:34
The Mozilla style guide uses examples where the va
| |
| 4 AlignEscapedNewlinesLeft: false | 4 Language: Cpp |
| 5 AlignTrailingComments: true | 5 BasedOnStyle: Mozilla |
| 6 AllowAllParametersOfDeclarationOnNextLine: false | 6 |
| 7 AllowShortBlocksOnASingleLine: false | 7 # _de facto_ style is no breaking for return types. |
| 8 AllowShortFunctionsOnASingleLine: All | 8 # Clang 5 version |
| 9 AllowShortIfStatementsOnASingleLine: false | 9 AlwaysBreakAfterReturnType: None |
| 10 AllowShortLoopsOnASingleLine: false | 10 # Clang 4 version |
| 11 AlwaysBreakBeforeMultilineStrings: false | 11 # Clang 4 documentation defect: It defines "AlwaysBreakAfterReturnType" and |
| 12 AlwaysBreakTemplateDeclarations: true | 12 # states that "AlwaysBreakAfterDefinitionReturnType" is deprecated. Disregard |
| 13 # this; the line below is necessary for Clang 4 and the Clang 5 version need not | |
| 14 # be commented out. | |
| 15 AlwaysBreakAfterDefinitionReturnType: None | |
| 16 | |
| 17 # Long function definitions or calls should not become even longer. | |
| 18 BinPackArguments: true | |
| 13 BinPackParameters: true | 19 BinPackParameters: true |
| 14 BreakBeforeBinaryOperators: false | 20 |
| 21 # Non-assignment operators appear at the beginning of line (after indent). | |
| 22 BreakBeforeBinaryOperators: NonAssignment | |
| 23 | |
| 24 # General override: "Opening braces always go on their own line." | |
| 15 BreakBeforeBraces: Allman | 25 BreakBeforeBraces: Allman |
| 16 BreakBeforeTernaryOperators: false | 26 |
| 27 # Don't treat commas specially within initializers. | |
| 28 # Clang 5 version | |
| 29 #BreakConstructorInitializers: BeforeColon | |
| 30 # Clang 4 version | |
| 17 BreakConstructorInitializersBeforeComma: false | 31 BreakConstructorInitializersBeforeComma: false |
| 32 | |
| 33 # Don't wrap long lines automatically. | |
| 34 # If lines need to be wrapped, do so explicitly. | |
| 18 ColumnLimit: 0 | 35 ColumnLimit: 0 |
|
hub
2017/09/06 14:42:42
Should we have a column limit like 80 ? it is loos
Eric
2017/09/08 15:48:34
I tried column limits before, and it wasn't practi
hub
2017/09/08 16:02:45
this actually unwrap manually wrapped lines. So ma
| |
| 19 CommentPragmas: '^ IWYU pragma:' | 36 |
| 20 ConstructorInitializerAllOnOneLineOrOnePerLine: true | 37 # Format braced lists like function calls. |
| 21 ConstructorInitializerIndentWidth: 2 | |
| 22 ContinuationIndentWidth: 2 | |
| 23 Cpp11BracedListStyle: true | 38 Cpp11BracedListStyle: true |
| 24 DerivePointerAlignment: false | 39 |
| 25 DisableFormat: false | 40 # Don't preserve excess vertical whitespace. |
| 26 ExperimentalAutoDetectBinPacking: false | |
| 27 ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] | |
| 28 IndentCaseLabels: false | |
|
hub
2017/09/06 14:56:51
This should be "true"
False turns
```
switch ()
Eric
2017/09/08 15:48:34
I changed this one to conform to the Mozilla style
| |
| 29 IndentFunctionDeclarationAfterType: false | |
| 30 IndentWidth: 2 | |
| 31 IndentWrappedFunctionNames: false | |
| 32 KeepEmptyLinesAtTheStartOfBlocks: false | 41 KeepEmptyLinesAtTheStartOfBlocks: false |
| 33 MaxEmptyLinesToKeep: 1 | 42 |
| 43 # C++ override. "Indent namespace bodies." | |
| 34 NamespaceIndentation: All | 44 NamespaceIndentation: All |
| 35 PenaltyBreakBeforeFirstCallParameter: 19 | 45 |
| 36 PenaltyBreakComment: 300 | 46 # Use modern C++. Argument stands for C++11, C++14, etc. |
| 37 PenaltyBreakFirstLessLess: 120 | |
| 38 PenaltyBreakString: 1000 | |
| 39 PenaltyExcessCharacter: 1000000 | |
| 40 PenaltyReturnTypeOnItsOwnLine: 200 | |
| 41 PointerAlignment: Left | |
| 42 SpaceBeforeAssignmentOperators: true | |
| 43 SpaceBeforeParens: ControlStatements | |
| 44 SpaceInEmptyParentheses: false | |
| 45 SpacesBeforeTrailingComments: 1 | |
| 46 SpacesInAngles: false | |
| 47 SpacesInContainerLiterals: true | |
| 48 SpacesInCStyleCastParentheses: false | |
| 49 SpacesInParentheses: false | |
| 50 SpacesInSquareBrackets: false | |
| 51 Standard: Cpp11 | 47 Standard: Cpp11 |
| 52 TabWidth: 8 | |
| 53 UseTab: Never | |
| 54 ... | 48 ... |
| 55 | |
| LEFT | RIGHT |