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/fru_area.cpp b/fru_area.cpp
index a5abf00..328ebad 100644
--- a/fru_area.cpp
+++ b/fru_area.cpp
@@ -11,8 +11,7 @@
 
 IPMIFruArea::IPMIFruArea(const uint8_t fruID, const ipmi_fru_area_type type,
                          bool bmcOnlyFru) :
-    fruID(fruID),
-    type(type), bmcOnlyFru(bmcOnlyFru)
+    fruID(fruID), type(type), bmcOnlyFru(bmcOnlyFru)
 {
     if (type == IPMI_FRU_AREA_INTERNAL_USE)
     {
diff --git a/frup.cpp b/frup.cpp
index 8f66a3b..00fcda8 100644
--- a/frup.cpp
+++ b/frup.cpp
@@ -216,8 +216,8 @@
 
     type_code = (type_length & IPMI_FRU_TYPE_LENGTH_TYPE_CODE_MASK) >>
                 IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SHIFT;
-    (*number_of_data_bytes) = type_length &
-                              IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK;
+    (*number_of_data_bytes) =
+        type_length & IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK;
 
     /* special case: this shouldn't be a length of 0x01 (see type/length
      * byte format in fru information storage definition).
@@ -245,12 +245,12 @@
     return (0);
 }
 
-int ipmi_fru_chassis_info_area(const void* areabuf, unsigned int areabuflen,
-                               uint8_t* chassis_type,
-                               ipmi_fru_field_t* chassis_part_number,
-                               ipmi_fru_field_t* chassis_serial_number,
-                               ipmi_fru_field_t* chassis_custom_fields,
-                               unsigned int chassis_custom_fields_len)
+int ipmi_fru_chassis_info_area(
+    const void* areabuf, unsigned int areabuflen, uint8_t* chassis_type,
+    ipmi_fru_field_t* chassis_part_number,
+    ipmi_fru_field_t* chassis_serial_number,
+    ipmi_fru_field_t* chassis_custom_fields,
+    unsigned int chassis_custom_fields_len)
 {
     const uint8_t* areabufptr = (const uint8_t*)areabuf;
     unsigned int area_offset = 0;
@@ -497,8 +497,8 @@
         goto out;
 
     if (_parse_type_length(areabufptr, areabuflen, area_offset,
-                           &number_of_data_bytes,
-                           product_manufacturer_name) < 0)
+                           &number_of_data_bytes, product_manufacturer_name) <
+        0)
         goto cleanup;
     area_offset += 1; /* type/length byte */
     area_offset += number_of_data_bytes;
@@ -516,8 +516,8 @@
         goto out;
 
     if (_parse_type_length(areabufptr, areabuflen, area_offset,
-                           &number_of_data_bytes,
-                           product_part_model_number) < 0)
+                           &number_of_data_bytes, product_part_model_number) <
+        0)
         goto cleanup;
     area_offset += 1; /* type/length byte */
     area_offset += number_of_data_bytes;
@@ -643,8 +643,8 @@
                    " Len = [%d] : Val = [%s]\n",
                    vpd_key_names[vpd_key_id], vpd_val_len, bin_in_ascii);
 #endif
-            info[vpd_key_id] = std::make_pair(vpd_key_names[vpd_key_id],
-                                              bin_in_ascii);
+            info[vpd_key_id] =
+                std::make_pair(vpd_key_names[vpd_key_id], bin_in_ascii);
             break;
 
         case 3:
@@ -750,8 +750,8 @@
                     printf("Board : Appending [%s] = [%s]\n", vpd_key_names[i],
                            timestr);
 #endif
-                    info[i] = std::make_pair(vpd_key_names[i],
-                                             std::string(timestr));
+                    info[i] =
+                        std::make_pair(vpd_key_names[i], std::string(timestr));
                     continue;
                 }
                 _append_to_dict(i, vpd_info[i].type_length_field, info);
diff --git a/strgfnhandler.cpp b/strgfnhandler.cpp
index ea60642..bf56096 100644
--- a/strgfnhandler.cpp
+++ b/strgfnhandler.cpp
@@ -18,11 +18,10 @@
 ///-------------------------------------------------------
 // Called by IPMI netfn router for write fru data command
 //--------------------------------------------------------
-ipmi_ret_t ipmiStorageWriteFruData(ipmi_netfn_t /*netfn*/, ipmi_cmd_t /*cmd*/,
-                                   ipmi_request_t request,
-                                   ipmi_response_t response,
-                                   ipmi_data_len_t dataLen,
-                                   ipmi_context_t /*context*/)
+ipmi_ret_t
+    ipmiStorageWriteFruData(ipmi_netfn_t /*netfn*/, ipmi_cmd_t /*cmd*/,
+                            ipmi_request_t request, ipmi_response_t response,
+                            ipmi_data_len_t dataLen, ipmi_context_t /*context*/)
 {
     FILE* fp = NULL;
     char fruFilename[16] = {0};
diff --git a/writefrudata.cpp b/writefrudata.cpp
index 50fa2d0..44117ae 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -93,8 +93,9 @@
     auto first = fruData.cbegin() + minIndexValue;
     auto last = first + (maxIndexValue - minIndexValue) + 1;
 
-    auto itr = std::find_if(first, last,
-                            [&key](const auto& e) { return key == e.first; });
+    auto itr = std::find_if(first, last, [&key](const auto& e) {
+        return key == e.first;
+    });
 
     if (itr != last)
     {
@@ -132,10 +133,10 @@
 auto getService(sdbusplus::bus_t& bus, const std::string& intf,
                 const std::string& path)
 {
-    auto mapperCall = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                          "/xyz/openbmc_project/object_mapper",
-                                          "xyz.openbmc_project.ObjectMapper",
-                                          "GetObject");
+    auto mapperCall =
+        bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                            "/xyz/openbmc_project/object_mapper",
+                            "xyz.openbmc_project.ObjectMapper", "GetObject");
 
     mapperCall.append(path);
     mapperCall.append(std::vector<std::string>({intf}));
@@ -539,10 +540,10 @@
                 return rc;
             }
 
-            auto fruDataView = std::span<uint8_t>(&fruData[areaOffset],
-                                                  areaLen);
-            auto areaData = std::vector<uint8_t>(fruDataView.begin(),
-                                                 fruDataView.end());
+            auto fruDataView =
+                std::span<uint8_t>(&fruData[areaOffset], areaLen);
+            auto areaData =
+                std::vector<uint8_t>(fruDataView.begin(), fruDataView.end());
 
             // Validate the CRC, but not for the internal use area, since its
             // contents beyond the first byte are not defined in the spec and
@@ -581,7 +582,7 @@
                 }
             }
         } // If we have FRU data present
-    }     // Walk struct common_header
+    } // Walk struct common_header
 
     // Not all the fields will be populated in a FRU data. Mostly all cases will
     // not have more than 2 or 3.
