|
| 1 | + |
| 2 | +# This format file is made especially for clang-format-3.7 |
| 3 | + |
| 4 | +--- |
| 5 | +BasedOnStyle: Google |
| 6 | +IndentWidth: 4 |
| 7 | +# clang-format is not very good to break long lines, don't let it do it |
| 8 | +ColumnLimit: 0 |
| 9 | +--- |
| 10 | +Language: Cpp |
| 11 | +Standard: Cpp11 |
| 12 | + |
| 13 | +# Tune some indentations |
| 14 | +AccessModifierOffset: -4 |
| 15 | +ConstructorInitializerIndentWidth: 8 |
| 16 | + |
| 17 | +# Only control statements should have spaces |
| 18 | +SpaceBeforeParens: ControlStatements |
| 19 | + |
| 20 | +# No block and its body should EVER be on a single line |
| 21 | +AllowShortFunctionsOnASingleLine: Empty |
| 22 | +AllowShortBlocksOnASingleLine: false |
| 23 | +AllowShortCaseLabelsOnASingleLine: false |
| 24 | +AllowShortIfStatementsOnASingleLine: false |
| 25 | +AllowShortLoopsOnASingleLine: false |
| 26 | + |
| 27 | +# Better C++11 support |
| 28 | +Cpp11BracedListStyle: true |
| 29 | + |
| 30 | +# Avoid too many empty lines |
| 31 | +MaxEmptyLinesToKeep: 1 |
| 32 | + |
| 33 | +# Templates should always be on a separate line |
| 34 | +AlwaysBreakTemplateDeclarations: true |
| 35 | + |
| 36 | +# Nice alignement |
| 37 | +AlignConsecutiveAssignments: true |
| 38 | + |
| 39 | +# Improve ternary operators alignement |
| 40 | +BreakBeforeTernaryOperators: true |
| 41 | + |
| 42 | +# Tabs are bad news |
| 43 | +UseTab: Never |
| 44 | + |
| 45 | +# Configure comments |
| 46 | +AlignTrailingComments: true |
| 47 | +SpacesBeforeTrailingComments: 1 |
| 48 | + |
| 49 | +# Don't mess with my comments |
| 50 | +CommentPragmas: '^[^ ]' |
| 51 | + |
| 52 | +# Avoid empty lines |
| 53 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 54 | +MaxEmptyLinesToKeep: 1 |
| 55 | + |
| 56 | +# Force pointers to the type |
| 57 | +DerivePointerAlignment: false |
| 58 | +PointerAlignment: Left |
0 commit comments