Last active
July 2, 2021 16:58
-
-
Save marcelohmariano/2aa9935e8d176b0f125c80e5796c5dc5 to your computer and use it in GitHub Desktop.
Google based C++ style to use with ClangFormat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clang-format -style="{\ | |
BasedOnStyle: Google, \ | |
AccessModifierOffset: -2, \ | |
AlignEscapedNewlines: DontAlign, \ | |
AlignTrailingComments: false, \ | |
AllowShortFunctionsOnASingleLine: Inline, \ | |
AllowShortIfStatementsOnASingleLine: false, \ | |
AllowShortLoopsOnASingleLine: false, \ | |
AlwaysBreakBeforeMultilineStrings: false, \ | |
BreakBeforeBinaryOperators: NonAssignment, \ | |
ColumnLimit: 0, \ | |
DerivePointerAlignment: false, \ | |
IndentWidth: 4, \ | |
KeepEmptyLinesAtTheStartOfBlocks: true, \ | |
SpacesInContainerLiterals: false, \ | |
TabWidth: 4 \ | |
}" -dump-config > .clang-format |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment