diff options
Diffstat (limited to '.clang-format')
| -rw-r--r-- | .clang-format | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..73bd832 --- /dev/null +++ b/.clang-format @@ -0,0 +1,62 @@ +--- +Language: Cpp +BasedOnStyle: Google + +# Indentation +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +AccessModifierOffset: -2 +NamespaceIndentation: None +IndentCaseLabels: true + +# Line width +ColumnLimit: 100 + +# Braces +BreakBeforeBraces: Attach +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AllowShortBlocksOnASingleLine: Empty + +# Includes +SortIncludes: CaseSensitive +IncludeBlocks: Regroup +IncludeCategories: + # Project headers + - Regex: '^"rcc/' + Priority: 1 + # System / C++ standard headers + - Regex: '^<' + Priority: 2 + # Catch-all + - Regex: '.*' + Priority: 3 + +# Alignment +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignOperands: Align +AlignTrailingComments: true + +# Spacing +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpacesInAngles: Never + +# Pointer alignment +PointerAlignment: Left +ReferenceAlignment: Left +DerivePointerAlignment: false + +# Other +ReflowComments: true +FixNamespaceComments: true +CompactNamespaces: false +AllowAllParametersOfDeclarationOnNextLine: true +BinPackArguments: true +BinPackParameters: true |
