From a99f7b7c959df5958ea8388bdc5979470d4f289f Mon Sep 17 00:00:00 2001 From: Dongsheng Song Date: Sun, 17 Feb 2019 00:43:54 +0800 Subject: [PATCH] Add .clang-format --- .clang-format | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..6792c4f --- /dev/null +++ b/.clang-format @@ -0,0 +1,29 @@ +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html +# clang-format -style=file -dump-config +# clang-format -style="{BasedOnStyle: Google}" -dump-config +--- +BasedOnStyle: Google +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +BraceWrapping: + AfterEnum: true + AfterExternBlock: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse : true +BreakBeforeBraces: Linux +BreakConstructorInitializers: BeforeComma +BreakAfterJavaFieldAnnotations: true +ColumnLimit: 120 +IndentWidth: 4 +NamespaceIndentation: All +ObjCBlockIndentWidth: 4 +PointerAlignment: Right +SortIncludes: false +SpaceAfterCStyleCast: true +SpacesInContainerLiterals: false +TabWidth: 4 +IndentPPDirectives: AfterHash