summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-04-11 15:46:39 +0300
committerSergey Vojtovich <svoj@mariadb.org>2019-05-30 23:27:31 +0400
commit5de08a53ef8567d9c316c5a9eb4eda0ed6a2b11e (patch)
tree4393a7efee875b460803e0003e8ab89e0e153b85
parentcbb90f77cdbf57c02145dc6cd86acf8ebb8a88f0 (diff)
downloadmariadb-git-5de08a53ef8567d9c316c5a9eb4eda0ed6a2b11e.tar.gz
MDEV-13631 Make use of clang-format
Add .clang-format files to a root directory and to storage/innobase
-rw-r--r--.clang-format18
-rw-r--r--storage/innobase/.clang-format10
2 files changed, 28 insertions, 0 deletions
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