From b90aaf9b8bcc51a5ee6d0c38a3a41a127383781d Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 12 Feb 2022 21:14:09 +0800 Subject: [PATCH] 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. --- .clang-format | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..249d707f --- /dev/null +++ b/.clang-format @@ -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 +...