From e03bc64116c0478d7333f641f1667c8e98c3efa2 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 23 Oct 2022 10:23:11 +0000 Subject: [PATCH] chore: add clang-format (which is similar to Visual Studio preset) --- .clang-format | 13 +++++++++++++ src/Connection.cpp | 2 +- src/Connection.h | 4 ++-- src/Packet.cpp | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..50aa71b --- /dev/null +++ b/.clang-format @@ -0,0 +1,13 @@ +{ + BasedOnStyle: LLVM, + UseTab: Never, + IndentWidth: 4, + TabWidth: 4, + BreakBeforeBraces: Allman, + AllowShortIfStatementsOnASingleLine: false, + IndentCaseLabels: false, + ColumnLimit: 0, + AccessModifierOffset: -4, + NamespaceIndentation: All, + FixNamespaceComments: false, +} diff --git a/src/Connection.cpp b/src/Connection.cpp index b9b8728..ab8c019 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -#include "ClientImpl.h" #include "Connection.h" +#include "ClientImpl.h" #include "Log.h" #include diff --git a/src/Connection.h b/src/Connection.h index 7e647bb..c5efa67 100644 --- a/src/Connection.h +++ b/src/Connection.h @@ -13,11 +13,11 @@ #include #include #include -#include -#include #include #include #include +#include +#include #include #include diff --git a/src/Packet.cpp b/src/Packet.cpp index 437dcdc..8bb835a 100644 --- a/src/Packet.cpp +++ b/src/Packet.cpp @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +#include "Packet.h" #include "ClientImpl.h" #include "Connection.h" #include "Log.h" -#include "Packet.h" #include #include -- libgit2 0.21.4