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/health_metric.cpp b/health_metric.cpp
index ad74597..13a5789 100644
--- a/health_metric.cpp
+++ b/health_metric.cpp
@@ -13,8 +13,8 @@
 
 using association_t = std::tuple<std::string, std::string, std::string>;
 
-auto HealthMetric::getPath(MType type, std::string name, SubType subType)
-    -> std::string
+auto HealthMetric::getPath(MType type, std::string name,
+                           SubType subType) -> std::string
 {
     std::string path;
     switch (subType)
@@ -59,8 +59,9 @@
                 static constexpr auto nameDelimiter = "_";
                 auto storageType = name.substr(
                     name.find_last_of(nameDelimiter) + 1, name.length());
-                std::ranges::for_each(storageType,
-                                      [](auto& c) { c = std::tolower(c); });
+                std::ranges::for_each(storageType, [](auto& c) {
+                    c = std::tolower(c);
+                });
                 return std::string(BmcPath) + "/" + PathIntf::storage + "/" +
                        storageType;
             }
@@ -212,8 +213,8 @@
     {
         return true;
     }
-    auto changed = std::abs((value.current - lastNotifiedValue) /
-                            lastNotifiedValue * 100.0);
+    auto changed = std::abs(
+        (value.current - lastNotifiedValue) / lastNotifiedValue * 100.0);
     if (changed >= config.hysteresis)
     {
         lastNotifiedValue = value.current;
@@ -239,8 +240,8 @@
         return;
     }
 
-    double average = (std::accumulate(history.begin(), history.end(), 0.0)) /
-                     history.size();
+    double average =
+        (std::accumulate(history.begin(), history.end(), 0.0)) / history.size();
     value.current = average;
     checkThresholds(value);
 }
diff --git a/health_metric_collection.hpp b/health_metric_collection.hpp
index d1fd4fb..f8aac92 100644
--- a/health_metric_collection.hpp
+++ b/health_metric_collection.hpp
@@ -15,8 +15,7 @@
     HealthMetricCollection(sdbusplus::bus_t& bus, MetricIntf::Type type,
                            const configs_t& configs,
                            MetricIntf::paths_t& bmcPaths) :
-        bus(bus),
-        type(type), configs(configs)
+        bus(bus), type(type), configs(configs)
     {
         create(bmcPaths);
     }
diff --git a/health_metric_config.cpp b/health_metric_config.cpp
index c3b80ba..bb52331 100644
--- a/health_metric_config.cpp
+++ b/health_metric_config.cpp
@@ -43,11 +43,11 @@
         {"Warning", ThresholdIntf::Type::Warning}};
 
 // Valid metrics from config
-static const auto validTypes =
-    std::unordered_map<std::string, Type>{{"CPU", Type::cpu},
-                                          {"Memory", Type::memory},
-                                          {"Storage", Type::storage},
-                                          {"Inode", Type::inode}};
+static const auto validTypes = std::unordered_map<std::string, Type>{
+    {"CPU", Type::cpu},
+    {"Memory", Type::memory},
+    {"Storage", Type::storage},
+    {"Inode", Type::inode}};
 
 // Valid submetrics from config
 static const auto validSubTypes = std::unordered_map<std::string, SubType>{
@@ -73,8 +73,8 @@
 /** Deserialize a HealthMetric from JSON. */
 void from_json(const json& j, HealthMetric& self)
 {
-    self.windowSize = j.value("Window_size",
-                              HealthMetric::defaults::windowSize);
+    self.windowSize =
+        j.value("Window_size", HealthMetric::defaults::windowSize);
     self.hysteresis = j.value("Hysteresis", HealthMetric::defaults::hysteresis);
     // Path is only valid for storage
     self.path = j.value("Path", "");
@@ -101,8 +101,8 @@
 
         static constexpr auto keyDelimiter = "_";
         std::string typeStr = key.substr(0, key.find_first_of(keyDelimiter));
-        std::string boundStr = key.substr(key.find_last_of(keyDelimiter) + 1,
-                                          key.length());
+        std::string boundStr =
+            key.substr(key.find_last_of(keyDelimiter) + 1, key.length());
 
         self.thresholds.emplace(
             std::make_tuple(validThresholdTypes.at(typeStr),
@@ -184,8 +184,8 @@
         config.name = name;
 
         auto subType = validSubTypes.find(name);
-        config.subType = (subType != validSubTypes.end() ? subType->second
-                                                         : SubType::NA);
+        config.subType =
+            (subType != validSubTypes.end() ? subType->second : SubType::NA);
 
         configs[type->second].emplace_back(std::move(config));
     }
diff --git a/test/test_health_metric.cpp b/test/test_health_metric.cpp
index 47a840a..067ced0 100644
--- a/test/test_health_metric.cpp
+++ b/test/test_health_metric.cpp
@@ -28,8 +28,8 @@
     static constexpr auto busName = "xyz.openbmc_project.test.HealthMon";
     const std::set<std::string> properties = {"Value", "MaxValue", "MinValue",
                                               "Unit"};
-    const std::string objPath = std::string(PathIntf::value) + "/bmc/" +
-                                PathIntf::kernel_cpu;
+    const std::string objPath =
+        std::string(PathIntf::value) + "/bmc/" + PathIntf::kernel_cpu;
     ConfigIntf::HealthMetric config;
 
     void SetUp() override
@@ -66,26 +66,26 @@
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_THAT(properties, testing::Contains(names[0]));
-        return 0;
-    }));
+                EXPECT_THAT(properties, testing::Contains(names[0]));
+                return 0;
+            }));
     EXPECT_CALL(sdbusMock, sd_bus_emit_properties_changed_strv(
                                IsNull(), StrEq(objPath),
                                StrEq(ThresholdIntf::interface), NotNull()))
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
-        return 0;
-    }));
+                EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
+                return 0;
+            }));
     EXPECT_CALL(sdbusMock,
                 sd_bus_message_new_signal(_, _, StrEq(objPath),
                                           StrEq(ThresholdIntf::interface),
                                           StrEq("AssertionChanged")))
         .Times(4);
 
-    auto metric = std::make_unique<HealthMetric>(bus, Type::cpu, config,
-                                                 paths_t());
+    auto metric =
+        std::make_unique<HealthMetric>(bus, Type::cpu, config, paths_t());
     // Exceed the critical threshold
     metric->update(MValue(1351, 1500));
     // Go below critical threshold but above warning threshold
diff --git a/test/test_health_metric_collection.cpp b/test/test_health_metric_collection.cpp
index 7086369..8135eb0 100644
--- a/test/test_health_metric_collection.cpp
+++ b/test/test_health_metric_collection.cpp
@@ -98,16 +98,16 @@
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        // Test no signal generation for metric init properties
-        const std::set<std::string> metricInitProperties = {"MaxValue",
-                                                            "MinValue", "Unit"};
-        EXPECT_THAT(metricInitProperties,
-                    testing::Not(testing::Contains(names[0])));
-        // Test signal generated for Value property set
-        const std::set<std::string> metricSetProperties = {"Value"};
-        EXPECT_THAT(metricSetProperties, testing::Contains(names[0]));
-        return 0;
-    }));
+                // Test no signal generation for metric init properties
+                const std::set<std::string> metricInitProperties = {
+                    "MaxValue", "MinValue", "Unit"};
+                EXPECT_THAT(metricInitProperties,
+                            testing::Not(testing::Contains(names[0])));
+                // Test signal generated for Value property set
+                const std::set<std::string> metricSetProperties = {"Value"};
+                EXPECT_THAT(metricSetProperties, testing::Contains(names[0]));
+                return 0;
+            }));
 
     EXPECT_CALL(sdbusMock,
                 sd_bus_emit_properties_changed_strv(
@@ -115,12 +115,12 @@
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        // Test signal generated for Value property set
-        EXPECT_STREQ("Value", names[0]);
-        // Test no signal generation for threshold asserted
-        EXPECT_STRNE("Asserted", names[0]);
-        return 0;
-    }));
+                // Test signal generated for Value property set
+                EXPECT_STREQ("Value", names[0]);
+                // Test no signal generation for threshold asserted
+                EXPECT_STRNE("Asserted", names[0]);
+                return 0;
+            }));
 
     createCollection();
 }
@@ -138,9 +138,9 @@
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_THAT("Value", StrEq(names[0]));
-        return 0;
-    }));
+                EXPECT_THAT("Value", StrEq(names[0]));
+                return 0;
+            }));
 
     // Test threshold asserted property change
     EXPECT_CALL(sdbusMock,
@@ -149,11 +149,12 @@
         .WillRepeatedly(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        // Test signal generation for threshold properties set
-        const std::set<std::string> thresholdProperties = {"Value", "Asserted"};
-        EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
-        return 0;
-    }));
+                // Test signal generation for threshold properties set
+                const std::set<std::string> thresholdProperties = {"Value",
+                                                                   "Asserted"};
+                EXPECT_THAT(thresholdProperties, testing::Contains(names[0]));
+                return 0;
+            }));
 
     // Test AssertionChanged signal generation
     EXPECT_CALL(sdbusMock,
