add clang-format to constraint the incoming new commits .

generally all the new added codes must be follow this style guildline.
the developers are encourage to use various IDE tool to adapt this format style.
Modern IDEs are usually support this .clang-format.
This commit is contained in:
xiaoyifang 2022-02-12 21:14:09 +08:00
parent 0e888db874
commit b90aaf9b8b

18
.clang-format Normal file
View file

@ -0,0 +1,18 @@
# Format Style Options - Created with Clang Power Tools
---
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
BasedOnStyle: LLVM
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Allman
BreakConstructorInitializers: AfterColon
ColumnLimit: 160
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth : 2
ContinuationIndentWidth: 2
MaxEmptyLinesToKeep: 2
PointerAlignment: Middle
SpacesInAngles: true
SpacesInParentheses: true
...