From 286ea6ca522a2058d6cc703c962e87649340d04a Mon Sep 17 00:00:00 2001 From: satanson Date: Sun, 5 Sep 2021 14:30:18 +0800 Subject: [PATCH] add .clang-format (#1) --- .clang-format | 15 +++++++++++++++ .gitignore | 1 + 2 files changed, 16 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000000..2ab48387dde91 --- /dev/null +++ b/.clang-format @@ -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 diff --git a/.gitignore b/.gitignore index 3decb656697e3..a148b4fd1d2df 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ be/tags .vscode .* !.gitignore +!.clang-format