add .clang-format (#1)

This commit is contained in:
satanson 2021-09-05 14:30:18 +08:00 committed by GitHub
parent 5fa55b8199
commit 286ea6ca52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

15
.clang-format Normal file
View File

@ -0,0 +1,15 @@
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Inline
ColumnLimit: 120
ConstructorInitializerIndentWidth: 8 # double of IndentWidth
ContinuationIndentWidth: 8 # double of IndentWidth
DerivePointerAlignment: false # always use PointerAlignment
IndentCaseLabels: false
IndentWidth: 4
PointerAlignment: Left
ReflowComments: false
SortUsingDeclarations: false
SpacesBeforeTrailingComments: 1

1
.gitignore vendored
View File

@ -52,3 +52,4 @@ be/tags
.vscode
.*
!.gitignore
!.clang-format