Add clang-format file

People should run `make format` before doing a commit.
Fix https://github.com/profanity-im/profanity/issues/1396
This commit is contained in:
Michael Vetter
2020-07-07 09:42:00 +02:00
parent 87ddb8081e
commit 66f9a6b721
3 changed files with 48 additions and 0 deletions

33
.clang-format Normal file
View File

@@ -0,0 +1,33 @@
Language: Cpp
BasedOnStyle: GNU
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeParens: ControlStatements
ColumnLimit: 0
PointerAlignment: Left
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowShortBlocksOnASingleLine: true
IndentWidth: 4
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterControlStatement: Never
AfterFunction: true
BeforeElse: false
#BeforeWhile: false
AfterStruct: true
#BreakStringLiterals: true