diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
 IndentWrappedFunctionNames: true
 InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
 LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
@@ -98,13 +98,14 @@
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
 PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
diff --git a/ipmi.cpp b/ipmi.cpp
index 3151559..5718e3c 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -256,8 +256,8 @@
     }
     std::memcpy(&request, data.data(), sizeof(request));
 
-    std::vector<uint8_t> result = mgr->read(request.sessionId, request.offset,
-                                            request.requestedSize);
+    std::vector<uint8_t> result =
+        mgr->read(request.sessionId, request.offset, request.requestedSize);
 
     /* If the Read fails, it returns success but with only the crc and 0 bytes
      * of data.
diff --git a/main.cpp b/main.cpp
index b34e52c..0e36533 100644
--- a/main.cpp
+++ b/main.cpp
@@ -48,15 +48,16 @@
                  "Registering OEM:[%#08X], Cmd:[%#04X] for Blob Commands\n",
                  oem::obmcOemNumber, oem::Cmd::blobTransferCmd);
 
-    ipmi::registerOemHandler(ipmi::prioOemBase, oem::obmcOemNumber,
-                             oem::Cmd::blobTransferCmd, ::ipmi::Privilege::User,
-                             [](ipmi::Context::ptr ctx, uint8_t cmd,
-                                const std::vector<uint8_t>& data) {
-        // Get current IPMI channel and get the max transfer size
-        // (assuming that it does not change).
-        return handleBlobCommand(cmd, data,
-                                 ipmi::getChannelMaxTransferSize(ctx->channel));
-    });
+    ipmi::registerOemHandler(
+        ipmi::prioOemBase, oem::obmcOemNumber, oem::Cmd::blobTransferCmd,
+        ::ipmi::Privilege::User,
+        [](ipmi::Context::ptr ctx, uint8_t cmd,
+           const std::vector<uint8_t>& data) {
+            // Get current IPMI channel and get the max transfer size
+            // (assuming that it does not change).
+            return handleBlobCommand(
+                cmd, data, ipmi::getChannelMaxTransferSize(ctx->channel));
+        });
 
     /* Install handlers. */
     try
diff --git a/manager.cpp b/manager.cpp
index ba019d4..0a274c2 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -256,8 +256,8 @@
     return nullptr;
 }
 
-GenericBlobInterface* BlobManager::getActionHandler(uint16_t session,
-                                                    uint16_t requiredFlags)
+GenericBlobInterface*
+    BlobManager::getActionHandler(uint16_t session, uint16_t requiredFlags)
 {
     if (auto item = sessions.find(session);
         item != sessions.end() && (item->second.flags & requiredFlags))
diff --git a/manager.hpp b/manager.hpp
index 02b9e8a..fbb272d 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -21,9 +21,7 @@
 {
     SessionInfo() = default;
     SessionInfo(const std::string& path, GenericBlobInterface* handler,
-                uint16_t flags) :
-        blobId(path),
-        handler(handler), flags(flags)
+                uint16_t flags) : blobId(path), handler(handler), flags(flags)
     {}
     ~SessionInfo() = default;
 
diff --git a/test/helper.hpp b/test/helper.hpp
index ac2c572..64aaefc 100644
--- a/test/helper.hpp
+++ b/test/helper.hpp
@@ -10,7 +10,6 @@
 
 namespace blobs
 {
-std::vector<std::uint8_t>
-    validateReply(ipmi::RspType<std::vector<uint8_t>> reply,
-                  bool hasData = true);
+std::vector<std::uint8_t> validateReply(
+    ipmi::RspType<std::vector<uint8_t>> reply, bool hasData = true);
 } // namespace blobs
diff --git a/test/ipmi_open_unittest.cpp b/test/ipmi_open_unittest.cpp
index cdd4dc3..b938cbe 100644
--- a/test/ipmi_open_unittest.cpp
+++ b/test/ipmi_open_unittest.cpp
@@ -77,9 +77,9 @@
 
     EXPECT_CALL(mgr, open(req.flags, StrEq(blobId), NotNull()))
         .WillOnce(Invoke([&](uint16_t, const std::string&, uint16_t* session) {
-        (*session) = returnedSession;
-        return true;
-    }));
+            (*session) = returnedSession;
+            return true;
+        }));
 
     auto result = validateReply(openBlob(&mgr, request));
 
diff --git a/test/ipmi_sessionstat_unittest.cpp b/test/ipmi_sessionstat_unittest.cpp
index 56171f2..3278f25 100644
--- a/test/ipmi_sessionstat_unittest.cpp
+++ b/test/ipmi_sessionstat_unittest.cpp
@@ -64,10 +64,10 @@
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req.sessionId),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](uint16_t, BlobMeta* meta) {
-        meta->blobState = blobState;
-        meta->size = size;
-        return true;
-    }));
+            meta->blobState = blobState;
+            meta->size = size;
+            return true;
+        }));
 
     auto result = validateReply(sessionStatBlob(&mgr, request));
 
@@ -105,9 +105,9 @@
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req.sessionId),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](uint16_t, BlobMeta* meta) {
-        (*meta) = lmeta;
-        return true;
-    }));
+            (*meta) = lmeta;
+            return true;
+        }));
 
     auto result = validateReply(sessionStatBlob(&mgr, request));
 
diff --git a/test/ipmi_stat_unittest.cpp b/test/ipmi_stat_unittest.cpp
index aab3a76..ab091ad 100644
--- a/test/ipmi_stat_unittest.cpp
+++ b/test/ipmi_stat_unittest.cpp
@@ -88,10 +88,10 @@
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](const std::string&, BlobMeta* meta) {
-        meta->blobState = blobState;
-        meta->size = size;
-        return true;
-    }));
+            meta->blobState = blobState;
+            meta->size = size;
+            return true;
+        }));
 
     auto result = validateReply(statBlob(&mgr, request));
 
@@ -131,9 +131,9 @@
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](const std::string&, BlobMeta* meta) {
-        (*meta) = lmeta;
-        return true;
-    }));
+            (*meta) = lmeta;
+            return true;
+        }));
 
     auto result = validateReply(statBlob(&mgr, request));
 
diff --git a/test/ipmi_unittest.cpp b/test/ipmi_unittest.cpp
index ed2f026..4364b89 100644
--- a/test/ipmi_unittest.cpp
+++ b/test/ipmi_unittest.cpp
@@ -43,8 +43,9 @@
     // return it.
     std::string request = "asdf";
     request.push_back('\0');
-    EXPECT_STREQ("asdf", stringFromBuffer(std::vector<uint8_t>(request.begin(),
-                                                               request.end()))
-                             .c_str());
+    EXPECT_STREQ(
+        "asdf",
+        stringFromBuffer(std::vector<uint8_t>(request.begin(), request.end()))
+            .c_str());
 }
 } // namespace blobs
diff --git a/test/ipmi_write_unittest.cpp b/test/ipmi_write_unittest.cpp
index 12cf1bc..18f2909 100644
--- a/test/ipmi_write_unittest.cpp
+++ b/test/ipmi_write_unittest.cpp
@@ -28,8 +28,8 @@
     std::array<uint8_t, 2> expectedBytes = {0x66, 0x67};
     request.insert(request.end(), expectedBytes.begin(), expectedBytes.end());
 
-    EXPECT_CALL(
-        mgr, write(req.sessionId, req.offset, ElementsAreArray(expectedBytes)))
+    EXPECT_CALL(mgr, write(req.sessionId, req.offset,
+                           ElementsAreArray(expectedBytes)))
         .WillOnce(Return(false));
 
     EXPECT_EQ(ipmi::responseUnspecifiedError(), writeBlob(&mgr, request));
@@ -53,8 +53,8 @@
     std::array<uint8_t, 2> expectedBytes = {0x66, 0x67};
     request.insert(request.end(), expectedBytes.begin(), expectedBytes.end());
 
-    EXPECT_CALL(
-        mgr, write(req.sessionId, req.offset, ElementsAreArray(expectedBytes)))
+    EXPECT_CALL(mgr, write(req.sessionId, req.offset,
+                           ElementsAreArray(expectedBytes)))
         .WillOnce(Return(true));
 
     EXPECT_EQ(ipmi::responseSuccess(std::vector<uint8_t>{}),
diff --git a/test/process_unittest.cpp b/test/process_unittest.cpp
index c4273c4..e3c68a9 100644
--- a/test/process_unittest.cpp
+++ b/test/process_unittest.cpp
@@ -213,12 +213,12 @@
     std::vector<uint8_t> request(MAX_IPMI_BUFFER - 1);
     uint32_t payloadLen = sizeof(uint16_t) + sizeof(uint8_t);
 
-    IpmiBlobHandler h = [payloadLen](ManagerInterface*,
-                                     std::span<const uint8_t>) {
-        std::vector<uint8_t> output(payloadLen, 0);
-        output[2] = 0x56;
-        return ipmi::responseSuccess(output);
-    };
+    IpmiBlobHandler h =
+        [payloadLen](ManagerInterface*, std::span<const uint8_t>) {
+            std::vector<uint8_t> output(payloadLen, 0);
+            output[2] = 0x56;
+            return ipmi::responseSuccess(output);
+        };
 
     EXPECT_CALL(crcMock, generateCrc(_)).WillOnce(Return(0x3412));
 
@@ -239,12 +239,12 @@
     std::vector<uint8_t> request(MAX_IPMI_BUFFER - 1);
     uint32_t payloadLen = sizeof(uint16_t) + sizeof(uint8_t);
 
-    IpmiBlobHandler h = [payloadLen](ManagerInterface*,
-                                     std::span<const uint8_t>) {
-        std::vector<uint8_t> output(payloadLen, 0);
-        output[2] = 0x56;
-        return ipmi::responseSuccess(output);
-    };
+    IpmiBlobHandler h =
+        [payloadLen](ManagerInterface*, std::span<const uint8_t>) {
+            std::vector<uint8_t> output(payloadLen, 0);
+            output[2] = 0x56;
+            return ipmi::responseSuccess(output);
+        };
 
     EXPECT_EQ(ipmi::responseResponseError(),
               processBlobCommand(h, &manager, request, 0));
