diff options
Diffstat (limited to '.clang-format')
| -rw-r--r-- | .clang-format | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/.clang-format b/.clang-format index cb492a9..2529c27 100644 --- a/.clang-format +++ b/.clang-format @@ -4,16 +4,38 @@ BasedOnStyle: LLVM IndentWidth: 2 UseTab: Never ColumnLimit: 80 -AllowShortBlocksOnASingleLine: Always -AllowShortCaseLabelsOnASingleLine: true -AllowShortEnumsOnASingleLine: true -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Always + +# From CONTRIBUTING.md: "The keyword 'public', 'protected', 'private' should be intended 1 character less than the methods." +# IndentWidth is 2, so AccessModifierOffset -1 results in indentation of 1. +AccessModifierOffset: -1 + +# From CONTRIBUTING.md: "prefer const T* name to const T *name" +PointerAlignment: Left +DerivePointerAlignment: false + +# From CONTRIBUTING.md: "keep the code compact vertically... Use only one statement per line." +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: All -AllowShortLoopsOnASingleLine: true -AllowShortNamespacesOnASingleLine: true +AllowShortLoopsOnASingleLine: false MaxEmptyLinesToKeep: 1 KeepEmptyLinesAtTheStartOfBlocks: false + +# From CONTRIBUTING.md: "put spaces around code and operators (cosmetics)" +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false + +# Misc improvements AlwaysBreakBeforeMultilineStrings: true -FixNamespaceComments: false -... +FixNamespaceComments: true +SortIncludes: true +Standard: Latest
\ No newline at end of file |
