Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: c++/clang-format/clang-format-eyeo

Issue 29537634: Noissue - clang-format configuration file for C++
Left Patch Set: address comments Created Sept. 8, 2017, 3:47 p.m.
Right Patch Set: new version Created Sept. 15, 2017, 12:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « c++/clang-format/README.md ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 --- 1 ---
2 Language: Cpp 2 # The syntax herein is for Clang 4, with opt-in support for Clang 5.
3 AccessModifierOffset: -2 3
4 AlignAfterOpenBracket: Align 4 Language: Cpp
5 AlignEscapedNewlinesLeft: false 5 BasedOnStyle: Mozilla
6 AlignTrailingComments: true 6
7 AllowAllParametersOfDeclarationOnNextLine: false 7 # _de facto_ style is no breaking for return types.
8 AllowShortBlocksOnASingleLine: false 8 # Clang 5 version
9 AllowShortFunctionsOnASingleLine: All 9 AlwaysBreakAfterReturnType: None
10 AllowShortIfStatementsOnASingleLine: false 10 # Clang 4 version
11 AllowShortLoopsOnASingleLine: false 11 # Clang 4 documentation defect: It defines "AlwaysBreakAfterReturnType" and
12 AlwaysBreakBeforeMultilineStrings: false 12 # states that "AlwaysBreakAfterDefinitionReturnType" is deprecated. Disregard
13 AlwaysBreakTemplateDeclarations: true 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
14 BinPackParameters: true 19 BinPackParameters: true
15 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."
16 BreakBeforeBraces: Allman 25 BreakBeforeBraces: Allman
17 BreakBeforeTernaryOperators: false 26
27 # Don't treat commas specially within initializers.
28 # Clang 5 version
29 #BreakConstructorInitializers: BeforeColon
30 # Clang 4 version
18 BreakConstructorInitializersBeforeComma: false 31 BreakConstructorInitializersBeforeComma: false
32
33 # Don't wrap long lines automatically.
34 # If lines need to be wrapped, do so explicitly.
19 ColumnLimit: 0 35 ColumnLimit: 0
20 CommentPragmas: '^ IWYU pragma:' 36
21 ConstructorInitializerAllOnOneLineOrOnePerLine: true 37 # Format braced lists like function calls.
22 ConstructorInitializerIndentWidth: 2
23 ContinuationIndentWidth: 2
24 Cpp11BracedListStyle: true 38 Cpp11BracedListStyle: true
25 DerivePointerAlignment: false 39
26 DisableFormat: false 40 # Don't preserve excess vertical whitespace.
27 ExperimentalAutoDetectBinPacking: false
28 ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
29 IndentCaseLabels: true
30 IndentFunctionDeclarationAfterType: false
31 IndentWidth: 2
32 IndentWrappedFunctionNames: false
33 KeepEmptyLinesAtTheStartOfBlocks: false 41 KeepEmptyLinesAtTheStartOfBlocks: false
34 MaxEmptyLinesToKeep: 1 42
43 # C++ override. "Indent namespace bodies."
35 NamespaceIndentation: All 44 NamespaceIndentation: All
36 PenaltyBreakBeforeFirstCallParameter: 19 45
37 PenaltyBreakComment: 300 46 # Use modern C++. Argument stands for C++11, C++14, etc.
38 PenaltyBreakFirstLessLess: 120
39 PenaltyBreakString: 1000
40 PenaltyExcessCharacter: 1000000
41 PenaltyReturnTypeOnItsOwnLine: 200
42 PointerAlignment: Left
43 SpaceBeforeAssignmentOperators: true
44 SpaceBeforeParens: ControlStatements
45 SpaceInEmptyParentheses: false
46 SpacesBeforeTrailingComments: 1
47 SpacesInAngles: false
48 SpacesInContainerLiterals: true
49 SpacesInCStyleCastParentheses: false
50 SpacesInParentheses: false
51 SpacesInSquareBrackets: false
52 Standard: Cpp11 47 Standard: Cpp11
53 TabWidth: 8
54 UseTab: Never
55 ... 48 ...
56
LEFTRIGHT

Powered by Google App Engine
This is Rietveld