diff --git a/.clang-format b/.clang-format index 827c89b435020ccdca9a15eb06a972ac5947c742..6fb27dd555ec9450c95d83b7de164e0a4fb4f864 100644 --- a/.clang-format +++ b/.clang-format @@ -1,13 +1,24 @@ -{ - BasedOnStyle: Google, - AccessModifierOffset: -4, - AlignConsecutiveAssignments: true, - AllowShortIfStatementsOnASingleLine: false, - AllowShortLoopsOnASingleLine: false, - BreakBeforeBraces: Allman, - ColumnLimit: 80, - ConstructorInitializerAllOnOneLineOrOnePerLine: false, - IndentCaseLabels: true, - IndentWidth: 4, - KeepEmptyLinesAtTheStartOfBlocks: true, -} +BasedOnStyle: Google + +ColumnLimit: 80 +IndentWidth: 4 +AccessModifierOffset: -4 + +BreakBeforeBraces: Allman +# Allow braceless single line if/else/for/while statements +RemoveBracesLLVM: true + +AlignConsecutiveAssignments: Consecutive +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +PackConstructorInitializers: BinPack +IndentCaseLabels: true + +# Empty lines behavior +InsertNewlineAtEOF: true +KeepEmptyLinesAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: false + +# Align pointers/references to the type, not the variable +DerivePointerAlignment: false +PointerAlignment: Left