0

Add .clang_format

Also applies clang-format to the current code base, using command:
`find . -regex '.*\.\(c\|h\)' -exec clang-format -style=file -i {} \;`
This commit is contained in:
Wunkolo
2019-06-23 18:43:32 -07:00
parent 676bf32af9
commit 8162f3f877
36 changed files with 1299 additions and 1372 deletions

38
.clang-format Normal file
View File

@@ -0,0 +1,38 @@
---
Language: Cpp
AlignEscapedNewlinesLeft: 'true'
AlignTrailingComments: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
ColumnLimit: '0'
ContinuationIndentWidth: '4'
IndentWidth: '4'
SortIncludes: true
IncludeCategories:
- Regex: '<[[:alnum:].]+>'
Priority: -1
- Regex: '\".*\"'
Priority: 1
IndentCaseLabels: false
MaxEmptyLinesToKeep: '1'
PointerAlignment: Left
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '1'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
TabWidth: '4'
BreakBeforeTernaryOperators: true
Cpp11BracedListStyle: true
BreakBeforeBraces: Custom
BraceWrapping:
BeforeElse: false
AfterEnum: false
AfterFunction: false
AfterStruct: false
AfterUnion: false
...