From 5de08a53ef8567d9c316c5a9eb4eda0ed6a2b11e Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Thu, 11 Apr 2019 15:46:39 +0300 Subject: [PATCH] MDEV-13631 Make use of clang-format Add .clang-format files to a root directory and to storage/innobase --- .clang-format | 18 ++++++++++++++++++ storage/innobase/.clang-format | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .clang-format create mode 100644 storage/innobase/.clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..3b735b16d74 --- /dev/null +++ b/.clang-format @@ -0,0 +1,18 @@ +SpaceBeforeAssignmentOperators: false +SpaceAfterCStyleCast: true + +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + AfterExternBlock: true + BeforeCatch: true + BeforeElse: true + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true diff --git a/storage/innobase/.clang-format b/storage/innobase/.clang-format new file mode 100644 index 00000000000..f7a72f3cf24 --- /dev/null +++ b/storage/innobase/.clang-format @@ -0,0 +1,10 @@ +UseTab: Always +TabWidth: 8 +IndentWidth: 8 +BreakBeforeBinaryOperators: All +PointerAlignment: Left +AlwaysBreakAfterReturnType: TopLevel +BreakBeforeBraces: Custom +BraceWrapping: + AfterFunction: true +AccessModifierOffset: -8