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/analyzer/plugins/ody-plugins.cpp b/analyzer/plugins/ody-plugins.cpp
index e71c7f5..8bb72e3 100644
--- a/analyzer/plugins/ody-plugins.cpp
+++ b/analyzer/plugins/ody-plugins.cpp
@@ -35,11 +35,12 @@
     // Copy all signatures PLL signatures that match the node ID and parent
     // processor chip.
     auto procTrgt = getParentProcessor(getTrgt(i_ocmbChip));
-    auto itr = std::copy_if(sigList.begin(), sigList.end(), pllList.begin(),
-                            [&nodeId, &procTrgt](const auto& s) {
-        return (nodeId == s.getId() &&
-                procTrgt == getParentProcessor(getTrgt(s.getChip())));
-    });
+    auto itr = std::copy_if(
+        sigList.begin(), sigList.end(), pllList.begin(),
+        [&nodeId, &procTrgt](const auto& s) {
+            return (nodeId == s.getId() &&
+                    procTrgt == getParentProcessor(getTrgt(s.getChip())));
+        });
 
     // Shrink the size of the PLL list if necessary.
     pllList.resize(std::distance(pllList.begin(), itr));
diff --git a/analyzer/plugins/p10-plugins.cpp b/analyzer/plugins/p10-plugins.cpp
index 1d5270f..0050991 100644
--- a/analyzer/plugins/p10-plugins.cpp
+++ b/analyzer/plugins/p10-plugins.cpp
@@ -33,16 +33,17 @@
     // in this case the bit position is the same as the plugin instance.
     auto itr = std::copy_if(sigList.begin(), sigList.end(), pllList.begin(),
                             [&nodeId, &i_instance](const auto& s) {
-        return (nodeId == s.getId() && i_instance == s.getBit());
-    });
+                                return (nodeId == s.getId() &&
+                                        i_instance == s.getBit());
+                            });
 
     // Shrink the size of the PLL list if necessary.
     pllList.resize(std::distance(pllList.begin(), itr));
 
     // The clock callout priority is dependent on the number of chips with PLL
     // unlock attentions.
-    auto clockPriority = (1 < pllList.size()) ? callout::Priority::HIGH
-                                              : callout::Priority::MED;
+    auto clockPriority =
+        (1 < pllList.size()) ? callout::Priority::HIGH : callout::Priority::MED;
 
     // Callout the clock.
     auto clockCallout = (0 == i_instance) ? callout::ClockType::OSC_REF_CLOCK_0
@@ -136,8 +137,8 @@
 {
     // Get the OMI target for this instance
     auto procTarget = util::pdbg::getTrgt(i_chip);
-    auto omiTarget = util::pdbg::getChipUnit(procTarget, util::pdbg::TYPE_OMI,
-                                             i_instance);
+    auto omiTarget =
+        util::pdbg::getChipUnit(procTarget, util::pdbg::TYPE_OMI, i_instance);
 
     if (nullptr != omiTarget)
     {
diff --git a/analyzer/plugins/p10-tod-plugins.cpp b/analyzer/plugins/p10-tod-plugins.cpp
index e7aecde..1ec99a4 100644
--- a/analyzer/plugins/p10-tod-plugins.cpp
+++ b/analyzer/plugins/p10-tod-plugins.cpp
@@ -165,8 +165,8 @@
     auto iohsUnit = getChipUnit(i_chipReportingError, TYPE_IOHS, i_iohsPos);
     if (nullptr != iohsUnit)
     {
-        auto clockSourceUnit = getConnectedTarget(iohsUnit,
-                                                  callout::BusType::SMP_BUS);
+        auto clockSourceUnit =
+            getConnectedTarget(iohsUnit, callout::BusType::SMP_BUS);
         if (nullptr != clockSourceUnit)
         {
             chipSourcingClock = getParentChip(clockSourceUnit);
@@ -234,8 +234,8 @@
             // The master path selects are sourced from the oscilator reference
             // clocks. So, we'll need to determine which one was used at the
             // time of the failure.
-            auto masterPathSelect = statusReg.getFieldRight(isPriTop ? 12 : 16,
-                                                            1);
+            auto masterPathSelect =
+                statusReg.getFieldRight(isPriTop ? 12 : 16, 1);
 
             // Determine if there is a step check fault for this path select.
             if (errorReg.isBitSet((0 == masterPathSelect) ? 14 : 15))
@@ -254,8 +254,8 @@
             // The slave path selects are sourced from other processor chips.
             // So, we'll need to determine which one was used at the time of the
             // failure.
-            auto slavePathSelect = statusReg.getFieldRight(isPriTop ? 15 : 19,
-                                                           1);
+            auto slavePathSelect =
+                statusReg.getFieldRight(isPriTop ? 15 : 19, 1);
 
             // Determine if there is a step check fault for this path select.
             if (errorReg.isBitSet((0 == slavePathSelect) ? 16 : 21))
diff --git a/analyzer/ras-data/ras-data-parser.cpp b/analyzer/ras-data/ras-data-parser.cpp
index de0a60d..023559f 100644
--- a/analyzer/ras-data/ras-data-parser.cpp
+++ b/analyzer/ras-data/ras-data-parser.cpp
@@ -291,9 +291,8 @@
 
 //------------------------------------------------------------------------------
 
-std::string
-    RasDataParser::parseSignature(const nlohmann::json& i_data,
-                                  const libhei::Signature& i_signature) const
+std::string RasDataParser::parseSignature(
+    const nlohmann::json& i_data, const libhei::Signature& i_signature) const
 {
     // Get the signature keys. All are hex (lower case) with no prefix.
     char buf[5];
@@ -328,9 +327,8 @@
 
 //------------------------------------------------------------------------------
 
-std::tuple<callout::BusType, std::string>
-    RasDataParser::parseBus(const nlohmann::json& i_data,
-                            const std::string& i_name)
+std::tuple<callout::BusType, std::string> RasDataParser::parseBus(
+    const nlohmann::json& i_data, const std::string& i_name)
 {
     auto bus = i_data.at("buses").at(i_name);
 
@@ -356,9 +354,8 @@
 
 //------------------------------------------------------------------------------
 
-std::shared_ptr<Resolution>
-    RasDataParser::parseAction(const nlohmann::json& i_data,
-                               const std::string& i_action)
+std::shared_ptr<Resolution> RasDataParser::parseAction(
+    const nlohmann::json& i_data, const std::string& i_action)
 {
     auto o_list = std::make_shared<ResolutionList>();
 
diff --git a/analyzer/resolution.hpp b/analyzer/resolution.hpp
index fc717ca..9b72b95 100644
--- a/analyzer/resolution.hpp
+++ b/analyzer/resolution.hpp
@@ -37,8 +37,7 @@
      */
     HardwareCalloutResolution(const std::string& i_unitPath,
                               callout::Priority i_priority, bool i_guard) :
-        iv_unitPath(i_unitPath),
-        iv_priority(i_priority), iv_guard(i_guard)
+        iv_unitPath(i_unitPath), iv_priority(i_priority), iv_guard(i_guard)
     {}
 
   private:
@@ -72,8 +71,8 @@
     ConnectedCalloutResolution(const callout::BusType& i_busType,
                                const std::string& i_unitPath,
                                callout::Priority i_priority, bool i_guard) :
-        iv_busType(i_busType),
-        iv_unitPath(i_unitPath), iv_priority(i_priority), iv_guard(i_guard)
+        iv_busType(i_busType), iv_unitPath(i_unitPath), iv_priority(i_priority),
+        iv_guard(i_guard)
     {}
 
   private:
@@ -114,8 +113,8 @@
     BusCalloutResolution(const callout::BusType& i_busType,
                          const std::string& i_unitPath,
                          callout::Priority i_priority, bool i_guard) :
-        iv_busType(i_busType),
-        iv_unitPath(i_unitPath), iv_priority(i_priority), iv_guard(i_guard)
+        iv_busType(i_busType), iv_unitPath(i_unitPath), iv_priority(i_priority),
+        iv_guard(i_guard)
     {}
 
   private:
@@ -149,8 +148,7 @@
      */
     ClockCalloutResolution(const callout::ClockType& i_clockType,
                            callout::Priority i_priority, bool i_guard) :
-        iv_clockType(i_clockType),
-        iv_priority(i_priority), iv_guard(i_guard)
+        iv_clockType(i_clockType), iv_priority(i_priority), iv_guard(i_guard)
     {}
 
   private:
@@ -178,8 +176,7 @@
      */
     ProcedureCalloutResolution(const callout::Procedure& i_procedure,
                                callout::Priority i_priority) :
-        iv_procedure(i_procedure),
-        iv_priority(i_priority)
+        iv_procedure(i_procedure), iv_priority(i_priority)
     {}
 
   private:
@@ -204,8 +201,7 @@
      */
     PartCalloutResolution(const callout::PartType& i_part,
                           callout::Priority i_priority) :
-        iv_part(i_part),
-        iv_priority(i_priority)
+        iv_part(i_part), iv_priority(i_priority)
     {}
 
   private:
diff --git a/analyzer/service_data.hpp b/analyzer/service_data.hpp
index a749f73..69e1ba7 100644
--- a/analyzer/service_data.hpp
+++ b/analyzer/service_data.hpp
@@ -27,8 +27,8 @@
     ServiceData(const libhei::Signature& i_rootCause,
                 AnalysisType i_analysisType,
                 const libhei::IsolationData& i_isoData) :
-        iv_rootCause(i_rootCause),
-        iv_analysisType(i_analysisType), iv_isoData(i_isoData)
+        iv_rootCause(i_rootCause), iv_analysisType(i_analysisType),
+        iv_isoData(i_isoData)
     {}
 
     /** @brief Destructor. */
diff --git a/attn/attention.cpp b/attn/attention.cpp
index 28e7dc7..4aabca0 100644
--- a/attn/attention.cpp
+++ b/attn/attention.cpp
@@ -7,8 +7,8 @@
 /** @brief Main constructor. */
 Attention::Attention(AttentionType i_type, int (*i_handler)(Attention*),
                      pdbg_target* i_target, Config* i_config) :
-    iv_type(i_type),
-    iv_handler(i_handler), iv_target(i_target), iv_config(i_config)
+    iv_type(i_type), iv_handler(i_handler), iv_target(i_target),
+    iv_config(i_config)
 
 {}
 
diff --git a/attn/attn_common.cpp b/attn/attn_common.cpp
index f11d739..5446331 100644
--- a/attn/attn_common.cpp
+++ b/attn/attn_common.cpp
@@ -185,8 +185,8 @@
                 {
                     // log cfam read error
                     trace::err("cfam read 0x1007 FAILED");
-                    eventAttentionFail((int)AttnSection::attnHandler |
-                                       ATTN_PDBG_CFAM);
+                    eventAttentionFail(
+                        (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                 }
                 // check for invalid/stale value
                 else if (0xffffffff == isr_val)
@@ -201,8 +201,8 @@
                     break;
                 }
             } // fsi target enabled
-        }     // pib target enabled
-    }         // next processor
+        } // pib target enabled
+    } // next processor
 
     return recoverableErrors;
 }
diff --git a/attn/attn_dbus.cpp b/attn/attn_dbus.cpp
index c0a5200..7314397 100644
--- a/attn/attn_dbus.cpp
+++ b/attn/attn_dbus.cpp
@@ -26,9 +26,9 @@
         if (0 == util::dbus::findService(i_interface, i_path, service))
         {
             // return the method
-            o_method = bus.new_method_call(service.c_str(), i_path.c_str(),
-                                           i_interface.c_str(),
-                                           i_function.c_str());
+            o_method =
+                bus.new_method_call(service.c_str(), i_path.c_str(),
+                                    i_interface.c_str(), i_function.c_str());
 
             rc = RC_SUCCESS;
         }
diff --git a/attn/attn_handler.cpp b/attn/attn_handler.cpp
index 73a8f8f..9ff65d7 100644
--- a/attn/attn_handler.cpp
+++ b/attn/attn_handler.cpp
@@ -129,8 +129,8 @@
                 {
                     // log cfam read error
                     trace::err("cfam read 0x1007 FAILED");
-                    eventAttentionFail((int)AttnSection::attnHandler |
-                                       ATTN_PDBG_CFAM);
+                    eventAttentionFail(
+                        (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                 }
                 else if (0xffffffff == isr_val)
                 {
@@ -149,8 +149,8 @@
                     {
                         // log cfam read error
                         trace::err("cfam read 0x100d FAILED");
-                        eventAttentionFail((int)AttnSection::attnHandler |
-                                           ATTN_PDBG_CFAM);
+                        eventAttentionFail(
+                            (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                     }
                     else if (0xffffffff == isr_mask)
                     {
@@ -187,10 +187,10 @@
                                                            target, i_config);
                         }
                     } // cfam 0x100d valid
-                }     // cfam 0x1007 valid
-            }         // fsi target enabled
-        }             // pib target enabled
-    }                 // next processor
+                } // cfam 0x1007 valid
+            } // fsi target enabled
+        } // pib target enabled
+    } // next processor
 
     // convert to heap, highest priority is at front
     if (!std::is_heap(active_attentions.begin(), active_attentions.end()))
diff --git a/attn/attn_logging.cpp b/attn/attn_logging.cpp
index 34f3735..a2ee0e3 100644
--- a/attn/attn_logging.cpp
+++ b/attn/attn_logging.cpp
@@ -71,8 +71,8 @@
  * @param   i_buffer - raw data (if creating raw dump ffdc entry in log)
  * @return  vector of FFDCFile objects
  */
-std::vector<util::FFDCFile> createFFDCFiles(char* i_buffer = nullptr,
-                                            size_t i_size = 0)
+std::vector<util::FFDCFile>
+    createFFDCFiles(char* i_buffer = nullptr, size_t i_size = 0)
 {
     std::vector<util::FFDCFile> files{};
 
@@ -175,8 +175,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key SrcAscii does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
@@ -234,8 +234,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key SrcAscii does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
@@ -405,8 +405,8 @@
                 // return.
                 trace::err(
                     "Error the key Subsystem does not exist in the map.");
-                eventAttentionFail((int)AttnSection::attnLogging |
-                                   ATTN_INVALID_KEY);
+                eventAttentionFail(
+                    (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
                 return 0;
             }
 
@@ -456,8 +456,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key Subsystem does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
diff --git a/attn/attn_monitor.cpp b/attn/attn_monitor.cpp
index afd99d1..a3ecfac 100644
--- a/attn/attn_monitor.cpp
+++ b/attn/attn_monitor.cpp
@@ -13,17 +13,17 @@
     iv_gpioEventDescriptor.async_wait(
         boost::asio::posix::stream_descriptor::wait_read,
         [this](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            trace::err("GPIO Async wait error: %s", ec.message().c_str());
-        }
-        else
-        {
-            trace::inf("Attention GPIO active");
-            handleGPIOEvent(); // gpio trigger detected
-        }
-        return;
-    }); // register async callback
+            if (ec)
+            {
+                trace::err("GPIO Async wait error: %s", ec.message().c_str());
+            }
+            else
+            {
+                trace::inf("Attention GPIO active");
+                handleGPIOEvent(); // gpio trigger detected
+            }
+            return;
+        }); // register async callback
 }
 
 /** @brief Handle the GPIO state change event */
diff --git a/attn/attn_monitor.hpp b/attn/attn_monitor.hpp
index f9f13e4..b2034bb 100644
--- a/attn/attn_monitor.hpp
+++ b/attn/attn_monitor.hpp
@@ -30,8 +30,7 @@
      */
     AttnMonitor(gpiod_line* line, gpiod_line_request_config& config,
                 boost::asio::io_context& io, Config* i_attnConfig) :
-        iv_gpioLine(line),
-        iv_gpioConfig(config), iv_gpioEventDescriptor(io),
+        iv_gpioLine(line), iv_gpioConfig(config), iv_gpioEventDescriptor(io),
         iv_config(i_attnConfig)
     {
         requestGPIOEvent(); // registers the event handler
diff --git a/attn/pel/section_header.hpp b/attn/pel/section_header.hpp
index ae0a2c5..d81e268 100644
--- a/attn/pel/section_header.hpp
+++ b/attn/pel/section_header.hpp
@@ -58,8 +58,8 @@
      */
     SectionHeader(uint16_t id, uint16_t size, uint8_t version, uint8_t subType,
                   uint16_t componentID) :
-        id(id),
-        size(size), version(version), subType(subType), componentID(componentID)
+        id(id), size(size), version(version), subType(subType),
+        componentID(componentID)
     {}
 
     /**
diff --git a/attn/ti_handler.cpp b/attn/ti_handler.cpp
index 3c93c3a..692cdad 100644
--- a/attn/ti_handler.cpp
+++ b/attn/ti_handler.cpp
@@ -175,8 +175,8 @@
             std::map<std::string, std::string> tiAdditionalData;
 
             // make note of recoverable errors present
-            tiAdditionalData["recoverables"] = recoverableErrors() ? "true"
-                                                                   : "false";
+            tiAdditionalData["recoverables"] =
+                recoverableErrors() ? "true" : "false";
 
             parseHbTiInfo(tiAdditionalData, i_tiDataArea);
 
@@ -259,8 +259,8 @@
         return;
     }
 
-    i_map["0x00 TI Area Valid"] = std::format("{:02x}",
-                                              i_tiDataArea->tiAreaValid);
+    i_map["0x00 TI Area Valid"] =
+        std::format("{:02x}", i_tiDataArea->tiAreaValid);
     i_map["0x01 Command"] = std::format("{:02x}", i_tiDataArea->command);
     i_map["0x02 Num. Data Bytes"] =
         std::format("{:04x}", be16toh(i_tiDataArea->numDataBytes));
@@ -269,12 +269,12 @@
         std::format("{:04x}", be16toh(i_tiDataArea->hardwareDumpType));
     i_map["0x08 SRC Format"] = std::format("{:02x}", i_tiDataArea->srcFormat);
     i_map["0x09 SRC Flags"] = std::format("{:02x}", i_tiDataArea->srcFlags);
-    i_map["0x0a Num. ASCII Words"] = std::format("{:02x}",
-                                                 i_tiDataArea->numAsciiWords);
-    i_map["0x0b Num. Hex Words"] = std::format("{:02x}",
-                                               i_tiDataArea->numHexWords);
-    i_map["0x0e Length of SRC"] = std::format("{:04x}",
-                                              be16toh(i_tiDataArea->lenSrc));
+    i_map["0x0a Num. ASCII Words"] =
+        std::format("{:02x}", i_tiDataArea->numAsciiWords);
+    i_map["0x0b Num. Hex Words"] =
+        std::format("{:02x}", i_tiDataArea->numHexWords);
+    i_map["0x0e Length of SRC"] =
+        std::format("{:04x}", be16toh(i_tiDataArea->lenSrc));
     i_map["0x10 SRC Word 12"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord12HbWord0));
     i_map["0x14 SRC Word 13"] =
@@ -291,29 +291,29 @@
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
     i_map["0x2c SRC Word 19"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
-    i_map["0x30 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData0));
-    i_map["0x34 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData1));
-    i_map["0x38 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData2));
-    i_map["0x3c ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData3));
-    i_map["0x40 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData4));
-    i_map["0x44 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData5));
-    i_map["0x48 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData6));
-    i_map["0x4c ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData7));
+    i_map["0x30 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
+    i_map["0x34 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
+    i_map["0x38 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData2));
+    i_map["0x3c ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData3));
+    i_map["0x40 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData4));
+    i_map["0x44 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData5));
+    i_map["0x48 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData6));
+    i_map["0x4c ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData7));
     i_map["0x50 Location"] = std::format("{:02x}", i_tiDataArea->location);
-    i_map["0x51 Code Sections"] = std::format("{:02x}",
-                                              i_tiDataArea->codeSection);
-    i_map["0x52 Additional Size"] = std::format("{:02x}",
-                                                i_tiDataArea->additionalSize);
-    i_map["0x53 Additional Data"] = std::format("{:02x}",
-                                                i_tiDataArea->andData);
+    i_map["0x51 Code Sections"] =
+        std::format("{:02x}", i_tiDataArea->codeSection);
+    i_map["0x52 Additional Size"] =
+        std::format("{:02x}", i_tiDataArea->additionalSize);
+    i_map["0x53 Additional Data"] =
+        std::format("{:02x}", i_tiDataArea->andData);
 }
 
 /** @brief Parse the TI info data area into map as hostboot data */
@@ -325,11 +325,11 @@
         return;
     }
 
-    i_map["0x00 TI Area Valid"] = std::format("{:02x}",
-                                              i_tiDataArea->tiAreaValid);
+    i_map["0x00 TI Area Valid"] =
+        std::format("{:02x}", i_tiDataArea->tiAreaValid);
     i_map["0x04 Reserved"] = std::format("{:02x}", i_tiDataArea->reserved1);
-    i_map["0x05 HB_Term. Type"] = std::format("{:02x}",
-                                              i_tiDataArea->hbTerminateType);
+    i_map["0x05 HB_Term. Type"] =
+        std::format("{:02x}", i_tiDataArea->hbTerminateType);
     i_map["0x0c HB Flags"] = std::format("{:02x}", i_tiDataArea->hbFlags);
     i_map["0x0d Source"] = std::format("{:02x}", i_tiDataArea->source);
     i_map["0x10 HB Word 0"] =
@@ -348,10 +348,10 @@
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
     i_map["0x2c HB Word 8"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
-    i_map["0x30 error_data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData0));
-    i_map["0x34 EID"] = std::format("{:08x}",
-                                    be32toh(i_tiDataArea->asciiData1));
+    i_map["0x30 error_data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
+    i_map["0x34 EID"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
 }
 
 } // namespace attn
diff --git a/test/test-end2end.cpp b/test/test-end2end.cpp
index 838eae3..ff7d468 100644
--- a/test/test-end2end.cpp
+++ b/test/test-end2end.cpp
@@ -62,9 +62,9 @@
 
         std::for_each(std::begin(attentions), std::end(attentions),
                       [](attn::Attention attention) {
-            trace::inf("calling handler");
-            attention.handle();
-        });
+                          trace::inf("calling handler");
+                          attention.handle();
+                      });
     }
 
     return rc;
diff --git a/test/test-tod-step-check-fault.cpp b/test/test-tod-step-check-fault.cpp
index 68ed39d..de31f03 100644
--- a/test/test-tod-step-check-fault.cpp
+++ b/test/test-tod-step-check-fault.cpp
@@ -62,8 +62,8 @@
     ServiceData sd{sig1, AnalysisType::SYSTEM_CHECKSTOP, isoData};
 
     // Call the plugin.
-    auto plugin = PluginMap::getSingleton().get(chip1.getType(),
-                                                "tod_step_check_fault");
+    auto plugin =
+        PluginMap::getSingleton().get(chip1.getType(), "tod_step_check_fault");
 
     plugin(0, chip1, sd);
 
diff --git a/util/dbus.cpp b/util/dbus.cpp
index af63487..b69b23f 100644
--- a/util/dbus.cpp
+++ b/util/dbus.cpp
@@ -428,9 +428,9 @@
             try
             {
                 // Format the vector into a single hex string to compare to.
-                std::string hexId = std::format("0x{:02x}{:02x}{:02x}{:02x}",
-                                                ids.at(0), ids.at(1), ids.at(2),
-                                                ids.at(3));
+                std::string hexId =
+                    std::format("0x{:02x}{:02x}{:02x}{:02x}", ids.at(0),
+                                ids.at(1), ids.at(2), ids.at(3));
 
                 std::map<std::string, MachineType> typeMap = {
                     {"0x50001000", MachineType::Rainier_2S4U},
@@ -479,8 +479,8 @@
     {
         // create dbus method
         auto bus = sdbusplus::bus::new_default();
-        sdbusplus::message_t method = bus.new_method_call(service, path,
-                                                          interface, function);
+        sdbusplus::message_t method =
+            bus.new_method_call(service, path, interface, function);
 
         // append additional method data
         method.append(terminusIdZero, PLDM_ENTITY_PROC, stateSetId);
@@ -514,8 +514,8 @@
     {
         // create dbus method
         auto bus = sdbusplus::bus::new_default();
-        sdbusplus::message_t method = bus.new_method_call(service, path,
-                                                          interface, function);
+        sdbusplus::message_t method =
+            bus.new_method_call(service, path, interface, function);
 
         // append additional method data
         method.append(terminusIdZero, PLDM_ENTITY_PROC, stateSetId);
@@ -546,8 +546,8 @@
     {
         // create dbus method
         auto bus = sdbusplus::bus::new_default();
-        sdbusplus::message_t method = bus.new_method_call(service, path,
-                                                          interface, function);
+        sdbusplus::message_t method =
+            bus.new_method_call(service, path, interface, function);
 
         // append endpoint ID
         method.append(Eid);
diff --git a/util/dbus.hpp b/util/dbus.hpp
index c1dc252..29851ee 100644
--- a/util/dbus.hpp
+++ b/util/dbus.hpp
@@ -65,9 +65,9 @@
     try
     {
         auto bus = sdbusplus::bus::new_default();
-        auto method = bus.new_method_call(service.c_str(), object.c_str(),
-                                          "org.freedesktop.DBus.Properties",
-                                          "Set");
+        auto method =
+            bus.new_method_call(service.c_str(), object.c_str(),
+                                "org.freedesktop.DBus.Properties", "Set");
         method.append(interface);
         method.append(propertyName);
         method.append(propertyValue);
diff --git a/util/ffdc.cpp b/util/ffdc.cpp
index 8f8069a..2c4a877 100644
--- a/util/ffdc.cpp
+++ b/util/ffdc.cpp
@@ -61,9 +61,8 @@
  * @param   max - Maximum number of messages fetch
  * @return  Vector of journal entry data
  */
-std::vector<std::string> sdjGetMessages(const std::string& field,
-                                        const std::string& fieldValue,
-                                        unsigned int max)
+std::vector<std::string> sdjGetMessages(
+    const std::string& field, const std::string& fieldValue, unsigned int max)
 {
     sd_journal* journal;
     std::vector<std::string> messages;
@@ -79,8 +78,8 @@
             if (value == fieldValue)
             {
                 // Get SYSLOG_IDENTIFIER field (process that logged message)
-                std::string syslog = sdjGetFieldValue(journal,
-                                                      "SYSLOG_IDENTIFIER");
+                std::string syslog =
+                    sdjGetFieldValue(journal, "SYSLOG_IDENTIFIER");
 
                 // Get _PID field
                 std::string pid = sdjGetFieldValue(journal, "_PID");
diff --git a/util/ffdc_file.cpp b/util/ffdc_file.cpp
index a067e0b..69ed073 100644
--- a/util/ffdc_file.cpp
+++ b/util/ffdc_file.cpp
@@ -19,8 +19,8 @@
     int fd = open(tempFile.getPath().c_str(), O_RDWR);
     if (fd == -1)
     {
-        throw std::runtime_error{std::string{"Unable to open FFDC file: "} +
-                                 strerror(errno)};
+        throw std::runtime_error{
+            std::string{"Unable to open FFDC file: "} + strerror(errno)};
     }
 
     // Store file descriptor in FileDescriptor object
@@ -33,8 +33,8 @@
     // Returns -1 if close failed.
     if (descriptor.close() == -1)
     {
-        throw std::runtime_error{std::string{"Unable to close FFDC file: "} +
-                                 strerror(errno)};
+        throw std::runtime_error{
+            std::string{"Unable to close FFDC file: "} + strerror(errno)};
     }
 
     // Delete temporary file.  Does nothing if file was already deleted.
diff --git a/util/ffdc_file.hpp b/util/ffdc_file.hpp
index 0e1e79e..f233eb2 100644
--- a/util/ffdc_file.hpp
+++ b/util/ffdc_file.hpp
@@ -164,9 +164,10 @@
 
     std::transform(i_files.begin(), i_files.end(), std::back_inserter(o_tuples),
                    [](const auto& e) {
-        return FFDCTuple(e.getFormat(), e.getSubType(), e.getVersion(),
-                         sdbusplus::message::unix_fd(e.getFileDescriptor()));
-    });
+                       return FFDCTuple(
+                           e.getFormat(), e.getSubType(), e.getVersion(),
+                           sdbusplus::message::unix_fd(e.getFileDescriptor()));
+                   });
 }
 
 } // namespace util
diff --git a/util/pdbg.cpp b/util/pdbg.cpp
index b499d83..50b4e7d 100644
--- a/util/pdbg.cpp
+++ b/util/pdbg.cpp
@@ -145,8 +145,8 @@
     // There should always be a parent chip. Throw an error if not found.
     if (nullptr == parentChip)
     {
-        throw std::logic_error("No parent chip found: i_target=" +
-                               std::string{getPath(i_target)});
+        throw std::logic_error(
+            "No parent chip found: i_target=" + std::string{getPath(i_target)});
     }
 
     return parentChip;
@@ -200,8 +200,8 @@
     }
     else
     {
-        throw std::logic_error("Unexpected parent chip: " +
-                               std::string{getPath(i_parentChip)});
+        throw std::logic_error(
+            "Unexpected parent chip: " + std::string{getPath(i_parentChip)});
     }
 
     // Iterate all children of the parent and match the unit position.
@@ -247,24 +247,24 @@
         // Rainier 4U
         case util::dbus::MachineType::Rainier_2S4U:
         case util::dbus::MachineType::Rainier_1S4U:
-            filePath = fs::path{PACKAGE_DIR
-                                "util-data/peer-targets-rainier-4u.json"};
+            filePath =
+                fs::path{PACKAGE_DIR "util-data/peer-targets-rainier-4u.json"};
             break;
         // Rainier 2U
         case util::dbus::MachineType::Rainier_2S2U:
         case util::dbus::MachineType::Rainier_1S2U:
-            filePath = fs::path{PACKAGE_DIR
-                                "util-data/peer-targets-rainier-2u.json"};
+            filePath =
+                fs::path{PACKAGE_DIR "util-data/peer-targets-rainier-2u.json"};
             break;
         // Everest
         case util::dbus::MachineType::Everest:
-            filePath = fs::path{PACKAGE_DIR
-                                "util-data/peer-targets-everest.json"};
+            filePath =
+                fs::path{PACKAGE_DIR "util-data/peer-targets-everest.json"};
             break;
         // Bonnell
         case util::dbus::MachineType::Bonnell:
-            filePath = fs::path{PACKAGE_DIR
-                                "util-data/peer-targets-bonnell.json"};
+            filePath =
+                fs::path{PACKAGE_DIR "util-data/peer-targets-bonnell.json"};
             break;
         default:
             trace::err("Invalid machine type found %d",
@@ -490,8 +490,8 @@
     auto mcc = pdbg_target_parent("mcc", ocmb);
     if (nullptr == mcc)
     {
-        throw std::logic_error("No parent MCC found for " +
-                               std::string{getPath(ocmb)});
+        throw std::logic_error(
+            "No parent MCC found for " + std::string{getPath(ocmb)});
     }
 
     // Read the associated DSTL_FIR_MASK.
diff --git a/util/pldm.cpp b/util/pldm.cpp
index 9dbe138..bbf2ce7 100644
--- a/util/pldm.cpp
+++ b/util/pldm.cpp
@@ -46,11 +46,9 @@
  *
  *  @return PLDM request message to be sent to host, empty message on error
  */
-std::vector<uint8_t> prepareSetEffecterReq(uint16_t effecterId,
-                                           uint8_t effecterCount,
-                                           uint8_t stateIdPos,
-                                           uint8_t stateSetValue,
-                                           uint8_t mctpEid)
+std::vector<uint8_t> prepareSetEffecterReq(
+    uint16_t effecterId, uint8_t effecterCount, uint8_t stateIdPos,
+    uint8_t stateSetValue, uint8_t mctpEid)
 {
     // get mctp instance associated with the endpoint ID
     uint8_t mctpInstance;
@@ -312,41 +310,42 @@
                 sdbusplus::bus::match::rules::path(path) +
                 sdbusplus::bus::match::rules::interface(interface),
             [&](auto& msg) {
-        uint8_t sensorTid{};
-        uint16_t sensorId{};
-        uint8_t msgSensorOffset{};
-        uint8_t eventState{};
-        uint8_t previousEventState{};
+                uint8_t sensorTid{};
+                uint16_t sensorId{};
+                uint8_t msgSensorOffset{};
+                uint8_t eventState{};
+                uint8_t previousEventState{};
 
-        // get sensor event details
-        msg.read(sensorTid, sensorId, msgSensorOffset, eventState,
-                 previousEventState);
+                // get sensor event details
+                msg.read(sensorTid, sensorId, msgSensorOffset, eventState,
+                         previousEventState);
 
-        // does sensor offset match?
-        if (sbeSensorOffset == msgSensorOffset)
-        {
-            // does sensor ID match?
-            auto sensorEntry = sensorToSbeInstance.find(sensorId);
-            if (sensorEntry != sensorToSbeInstance.end())
-            {
-                const uint8_t instance = sensorEntry->second;
-
-                // if instances matche check status
-                if (instance == sbeInstance)
+                // does sensor offset match?
+                if (sbeSensorOffset == msgSensorOffset)
                 {
-                    if (eventState == static_cast<uint8_t>(SBE_HRESET_READY))
+                    // does sensor ID match?
+                    auto sensorEntry = sensorToSbeInstance.find(sensorId);
+                    if (sensorEntry != sensorToSbeInstance.end())
                     {
-                        hresetStatus = "success";
-                    }
-                    else if (eventState ==
-                             static_cast<uint8_t>(SBE_HRESET_FAILED))
-                    {
-                        hresetStatus = "fail";
+                        const uint8_t instance = sensorEntry->second;
+
+                        // if instances matche check status
+                        if (instance == sbeInstance)
+                        {
+                            if (eventState ==
+                                static_cast<uint8_t>(SBE_HRESET_READY))
+                            {
+                                hresetStatus = "success";
+                            }
+                            else if (eventState ==
+                                     static_cast<uint8_t>(SBE_HRESET_FAILED))
+                            {
+                                hresetStatus = "fail";
+                            }
+                        }
                     }
                 }
-            }
-        }
-    });
+            });
 
     // send request to issue hreset of sbe
     int pldmFd = -1; // mctp socket file descriptor
diff --git a/util/temporary_file.cpp b/util/temporary_file.cpp
index 68b1d24..0bd4d08 100644
--- a/util/temporary_file.cpp
+++ b/util/temporary_file.cpp
@@ -14,8 +14,8 @@
 TemporaryFile::TemporaryFile()
 {
     // Build template path required by mkstemp()
-    std::string templatePath = fs::temp_directory_path() /
-                               "openpower-hw-diags-XXXXXX";
+    std::string templatePath =
+        fs::temp_directory_path() / "openpower-hw-diags-XXXXXX";
 
     // Generate unique file name, create file, and open it.  The XXXXXX
     // characters are replaced by mkstemp() to make the file name unique.
