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/average.cpp b/average.cpp
index 7b12d70..2cc5240 100644
--- a/average.cpp
+++ b/average.cpp
@@ -20,10 +20,9 @@
     _previousAverageMap[sensorKey] = sensorValue;
 }
 
-std::optional<int64_t> Average::calcAverage(int64_t preAverage,
-                                            int64_t preInterval,
-                                            int64_t curAverage,
-                                            int64_t curInterval)
+std::optional<int64_t>
+    Average::calcAverage(int64_t preAverage, int64_t preInterval,
+                         int64_t curAverage, int64_t curInterval)
 {
     int64_t value = 0;
     // Estimate that the interval will overflow about 292471
@@ -43,9 +42,9 @@
     // (a2*i2-a1*i1)/(i2-i1) =
     // (a2*(i1+delta)-a1*i1)/delta =
     // (a2-a1)(i1/delta)+a2
-    value = (curAverage - preAverage) *
-                (static_cast<double>(preInterval) / delta) +
-            curAverage;
+    value =
+        (curAverage - preAverage) * (static_cast<double>(preInterval) / delta) +
+        curAverage;
 
     return value;
 }
diff --git a/average.hpp b/average.hpp
index cf2afd3..bf91404 100644
--- a/average.hpp
+++ b/average.hpp
@@ -60,10 +60,9 @@
      *      return {}, if curInterval-preInterval=0
      *      return new calculated average value, if curInterval-preInterval>0
      */
-    static std::optional<int64_t> calcAverage(int64_t preAverage,
-                                              int64_t preInterval,
-                                              int64_t curAverage,
-                                              int64_t curInterval);
+    static std::optional<int64_t>
+        calcAverage(int64_t preAverage, int64_t preInterval, int64_t curAverage,
+                    int64_t curInterval);
 
   private:
     /** @brief Store the previous average sensor map */
diff --git a/fan_pwm.cpp b/fan_pwm.cpp
index 6e903d3..2e3dc1e 100644
--- a/fan_pwm.cpp
+++ b/fan_pwm.cpp
@@ -38,8 +38,8 @@
             xyz::openbmc_project::Control::Device::WriteFailure::
                 CALLOUT_DEVICE_PATH(_devPath.c_str()));
 
-        auto file = sysfs::make_sysfs_path(_ioAccess->path(), _type, _id,
-                                           empty);
+        auto file =
+            sysfs::make_sysfs_path(_ioAccess->path(), _type, _id, empty);
 
         log<level::INFO>(std::format("Failing sysfs file: {} errno: {}", file,
                                      e.code().value())
diff --git a/mainloop.cpp b/mainloop.cpp
index 6fa74d3..52c3c64 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -217,8 +217,8 @@
     const auto& [sensorSysfsType, sensorSysfsNum] = sensorSetKey;
 
     /* Note: The sensor objects all share the same ioAccess object. */
-    auto sensorObj = std::make_unique<sensor::Sensor>(sensorSetKey, _ioAccess,
-                                                      _devPath);
+    auto sensorObj =
+        std::make_unique<sensor::Sensor>(sensorSetKey, _ioAccess, _devPath);
 
     // Get list of return codes for removing sensors on device
     auto devRmRCs = env::getEnv("REMOVERCS");
@@ -274,9 +274,9 @@
     }
     catch (const std::system_error& e)
     {
-        auto file = sysfs::make_sysfs_path(_ioAccess->path(), sensorSysfsType,
-                                           sensorSysfsNum,
-                                           hwmon::entry::cinput);
+        auto file =
+            sysfs::make_sysfs_path(_ioAccess->path(), sensorSysfsType,
+                                   sensorSysfsNum, hwmon::entry::cinput);
 
         // Check sensorAdjusts for sensor removal RCs
         auto& sAdjusts = sensorObj->getAdjusts();
@@ -315,8 +315,8 @@
                                  std::get<sensorID>(properties), sensorValue,
                                  info, scale);
 
-    auto target = addTarget<hwmon::FanSpeed>(sensorSetKey, _ioAccess, _devPath,
-                                             info);
+    auto target =
+        addTarget<hwmon::FanSpeed>(sensorSetKey, _ioAccess, _devPath, info);
     if (target)
     {
         target->enable();
@@ -339,9 +339,8 @@
                    const char* prefix, const char* root,
                    const std::string& instanceId,
                    const hwmonio::HwmonIOInterface* ioIntf) :
-    _bus(std::move(bus)),
-    _manager(_bus, root), _pathParam(param), _hwmonRoot(), _instance(),
-    _devPath(devPath), _prefix(prefix), _root(root), _state(),
+    _bus(std::move(bus)), _manager(_bus, root), _pathParam(param), _hwmonRoot(),
+    _instance(), _devPath(devPath), _prefix(prefix), _root(root), _state(),
     _instanceId(instanceId), _ioAccess(ioIntf),
     _event(sdeventplus::Event::get_default()),
     _timer(_event, std::bind(&MainLoop::read, this))
@@ -410,9 +409,9 @@
             // std::tuple<SensorSet::mapped_type,
             //            std::string(Sensor Label),
             //            ObjectInfo>
-            auto value = std::make_tuple(std::move(i.second),
-                                         std::move((*object).first),
-                                         std::move((*object).second));
+            auto value =
+                std::make_tuple(std::move(i.second), std::move((*object).first),
+                                std::move((*object).second));
 
             _state[std::move(i.first)] = std::move(value);
         }
@@ -514,8 +513,8 @@
 
                 // For sensors with attribute ASYNC_READ_TIMEOUT,
                 // spawn a thread with timeout
-                auto asyncReadTimeout = env::getEnv("ASYNC_READ_TIMEOUT",
-                                                    sensorSetKey);
+                auto asyncReadTimeout =
+                    env::getEnv("ASYNC_READ_TIMEOUT", sensorSetKey);
                 if (!asyncReadTimeout.empty())
                 {
                     std::chrono::milliseconds asyncTimeout{
@@ -529,9 +528,9 @@
                 {
                     // Retry for up to a second if device is busy
                     // or has a transient error.
-                    value = _ioAccess->read(sensorSysfsType, sensorSysfsNum,
-                                            input, hwmonio::retries,
-                                            hwmonio::delay);
+                    value =
+                        _ioAccess->read(sensorSysfsType, sensorSysfsNum, input,
+                                        hwmonio::retries, hwmonio::delay);
                 }
 
                 // Set functional property to true if we could read sensor
@@ -679,9 +678,9 @@
                     input = hwmon::entry::average;
                 }
                 // Sensor object added, erase entry from removal list
-                auto file = sysfs::make_sysfs_path(_ioAccess->path(),
-                                                   it->first.first,
-                                                   it->first.second, input);
+                auto file =
+                    sysfs::make_sysfs_path(_ioAccess->path(), it->first.first,
+                                           it->first.second, input);
 
                 log<level::INFO>("Added sensor to dbus after successful read",
                                  entry("FILE=%s", file.c_str()));
diff --git a/sensor.cpp b/sensor.cpp
index 72d7821..ff7635f 100644
--- a/sensor.cpp
+++ b/sensor.cpp
@@ -31,8 +31,8 @@
 Sensor::Sensor(const SensorSet::key_type& sensor,
                const hwmonio::HwmonIOInterface* ioAccess,
                const std::string& devPath) :
-    _sensor(sensor),
-    _ioAccess(ioAccess), _devPath(devPath), _scale(0), _hasFaultFile(false)
+    _sensor(sensor), _ioAccess(ioAccess), _devPath(devPath), _scale(0),
+    _hasFaultFile(false)
 {
     auto chip = env::getEnv("GPIOCHIP", sensor);
     auto access = env::getEnv("GPIO", sensor);
@@ -105,9 +105,9 @@
 #endif
 
     // Adjust based on gain and offset
-    value = static_cast<decltype(value)>(static_cast<double>(value) *
-                                             _sensorAdjusts.gain +
-                                         _sensorAdjusts.offset);
+    value = static_cast<decltype(value)>(
+        static_cast<double>(value) * _sensorAdjusts.gain +
+        _sensorAdjusts.offset);
 
     if constexpr (std::is_same<SensorValueType, double>::value)
     {
@@ -117,9 +117,8 @@
     return value;
 }
 
-std::shared_ptr<ValueObject> Sensor::addValue(const RetryIO& retryIO,
-                                              ObjectInfo& info,
-                                              TimedoutMap& timedoutMap)
+std::shared_ptr<ValueObject> Sensor::addValue(
+    const RetryIO& retryIO, ObjectInfo& info, TimedoutMap& timedoutMap)
 {
     // Get the initial value for the value interface.
     auto& bus = *std::get<sdbusplus::bus_t*>(info);
@@ -221,8 +220,8 @@
     std::string entry = hwmon::entry::fault;
 
     bool functional = true;
-    auto sysfsFullPath = sysfs::make_sysfs_path(_ioAccess->path(), faultName,
-                                                faultID, entry);
+    auto sysfsFullPath =
+        sysfs::make_sysfs_path(_ioAccess->path(), faultName, faultID, entry);
     if (fs::exists(sysfsFullPath))
     {
         _hasFaultFile = true;
@@ -263,8 +262,8 @@
     return iface;
 }
 
-std::shared_ptr<AccuracyObject> Sensor::addAccuracy(ObjectInfo& info,
-                                                    double accuracy)
+std::shared_ptr<AccuracyObject>
+    Sensor::addAccuracy(ObjectInfo& info, double accuracy)
 {
     auto& objPath = std::get<std::string>(info);
     auto& obj = std::get<InterfaceMap>(info);
@@ -279,8 +278,8 @@
     return iface;
 }
 
-std::shared_ptr<PriorityObject> Sensor::addPriority(ObjectInfo& info,
-                                                    size_t priority)
+std::shared_ptr<PriorityObject>
+    Sensor::addPriority(ObjectInfo& info, size_t priority)
 {
     auto& objPath = std::get<std::string>(info);
     auto& obj = std::get<InterfaceMap>(info);
@@ -313,13 +312,12 @@
     return GpioLocker(std::move(handle));
 }
 
-SensorValueType asyncRead(const SensorSet::key_type& sensorSetKey,
-                          const hwmonio::HwmonIOInterface* ioAccess,
-                          std::chrono::milliseconds asyncTimeout,
-                          TimedoutMap& timedoutMap, const std::string& type,
-                          const std::string& id, const std::string& sensor,
-                          const size_t retries,
-                          const std::chrono::milliseconds delay)
+SensorValueType asyncRead(
+    const SensorSet::key_type& sensorSetKey,
+    const hwmonio::HwmonIOInterface* ioAccess,
+    std::chrono::milliseconds asyncTimeout, TimedoutMap& timedoutMap,
+    const std::string& type, const std::string& id, const std::string& sensor,
+    const size_t retries, const std::chrono::milliseconds delay)
 {
     // Default async read timeout
     bool valueIsValid = false;
@@ -329,9 +327,9 @@
     if (asyncIter == timedoutMap.end())
     {
         // If sensor not found in timedoutMap, spawn an async thread
-        asyncThread = std::async(std::launch::async,
-                                 &hwmonio::HwmonIOInterface::read, ioAccess,
-                                 type, id, sensor, retries, delay);
+        asyncThread =
+            std::async(std::launch::async, &hwmonio::HwmonIOInterface::read,
+                       ioAccess, type, id, sensor, retries, delay);
         valueIsValid = true;
     }
     else
diff --git a/sensor.hpp b/sensor.hpp
index ac38cff..9963ed8 100644
--- a/sensor.hpp
+++ b/sensor.hpp
@@ -107,9 +107,8 @@
      *
      * @return - Shared pointer to the value object
      */
-    std::shared_ptr<ValueObject> addValue(const RetryIO& retryIO,
-                                          ObjectInfo& info,
-                                          TimedoutMap& timedoutMap);
+    std::shared_ptr<ValueObject> addValue(
+        const RetryIO& retryIO, ObjectInfo& info, TimedoutMap& timedoutMap);
 
     /**
      * @brief Add status interface and functional property for sensor
@@ -134,8 +133,8 @@
      *
      * @return - Shared pointer to the accuracy object
      */
-    std::shared_ptr<AccuracyObject> addAccuracy(ObjectInfo& info,
-                                                double accuracy);
+    std::shared_ptr<AccuracyObject>
+        addAccuracy(ObjectInfo& info, double accuracy);
 
     /**
      * @brief Add Priority interface and priority property for sensors
@@ -147,8 +146,8 @@
      * @return - Shared pointer to the priority object
      */
 
-    std::shared_ptr<PriorityObject> addPriority(ObjectInfo& info,
-                                                size_t priority);
+    std::shared_ptr<PriorityObject>
+        addPriority(ObjectInfo& info, size_t priority);
 
     /**
      * @brief Get the scale from the sensor.
@@ -240,11 +239,10 @@
  *
  * @return - SensorValueType read asynchronously, will throw if timed out
  */
-SensorValueType asyncRead(const SensorSet::key_type& sensorSetKey,
-                          const hwmonio::HwmonIOInterface* ioAccess,
-                          std::chrono::milliseconds asyncTimeout,
-                          TimedoutMap& timedoutMap, const std::string& type,
-                          const std::string& id, const std::string& sensor,
-                          const size_t retries,
-                          const std::chrono::milliseconds delay);
+SensorValueType asyncRead(
+    const SensorSet::key_type& sensorSetKey,
+    const hwmonio::HwmonIOInterface* ioAccess,
+    std::chrono::milliseconds asyncTimeout, TimedoutMap& timedoutMap,
+    const std::string& type, const std::string& id, const std::string& sensor,
+    const size_t retries, const std::chrono::milliseconds delay);
 } // namespace sensor
diff --git a/sysfs.cpp b/sysfs.cpp
index d4c47aa..aae6ff3 100644
--- a/sysfs.cpp
+++ b/sysfs.cpp
@@ -220,11 +220,11 @@
         }
 
         auto dir_iter = fs::directory_iterator(path);
-        auto hwmonInst = std::find_if(dir_iter, end(dir_iter),
-                                      [](const fs::directory_entry& d) {
-            return (d.path().filename().string().find("hwmon") !=
-                    std::string::npos);
-        });
+        auto hwmonInst = std::find_if(
+            dir_iter, end(dir_iter), [](const fs::directory_entry& d) {
+                return (d.path().filename().string().find("hwmon") !=
+                        std::string::npos);
+            });
         if (hwmonInst != end(dir_iter))
         {
             return hwmonInst->path();
diff --git a/sysfs.hpp b/sysfs.hpp
index 80fb3d6..aac9c2b 100644
--- a/sysfs.hpp
+++ b/sysfs.hpp
@@ -5,10 +5,9 @@
 namespace sysfs
 {
 
-inline std::string make_sysfs_path(const std::string& path,
-                                   const std::string& type,
-                                   const std::string& id,
-                                   const std::string& entry)
+inline std::string
+    make_sysfs_path(const std::string& path, const std::string& type,
+                    const std::string& id, const std::string& entry)
 {
     using namespace std::literals;
 
diff --git a/targets.hpp b/targets.hpp
index 5cd82ff..4c2786f 100644
--- a/targets.hpp
+++ b/targets.hpp
@@ -98,8 +98,8 @@
         entry = empty;
     }
 
-    sysfsFullPath = sysfs::make_sysfs_path(ioAccess->path(), targetName,
-                                           targetId, entry);
+    sysfsFullPath =
+        sysfs::make_sysfs_path(ioAccess->path(), targetName, targetId, entry);
     if (fs::exists(sysfsFullPath))
     {
         auto useTarget = true;
diff --git a/test/fanpwm_unittest.cpp b/test/fanpwm_unittest.cpp
index 66910c3..8f12b19 100644
--- a/test/fanpwm_unittest.cpp
+++ b/test/fanpwm_unittest.cpp
@@ -37,9 +37,9 @@
                                                         StrEq(intf), NotNull()))
             .WillOnce(Invoke(
                 [=](sd_bus*, const char*, const char*, const char** names) {
-            EXPECT_STREQ(property.c_str(), names[0]);
-            return 0;
-        }));
+                    EXPECT_STREQ(property.c_str(), names[0]);
+                    return 0;
+                }));
     }
 
     return;
@@ -137,9 +137,9 @@
                     IsNull(), StrEq("asdf"), StrEq(FanPwmIntf), NotNull()))
         .WillOnce(
             Invoke([&](sd_bus*, const char*, const char*, const char** names) {
-        EXPECT_EQ(0, strncmp("Target", names[0], 6));
-        return 0;
-    }));
+                EXPECT_EQ(0, strncmp("Target", names[0], 6));
+                return 0;
+            }));
 
     EXPECT_EQ(target, f.target(target));
 }
diff --git a/test/hwmonio_mock.hpp b/test/hwmonio_mock.hpp
index 6caa67e..0edcf52 100644
--- a/test/hwmonio_mock.hpp
+++ b/test/hwmonio_mock.hpp
@@ -10,7 +10,7 @@
 class HwmonIOMock : public HwmonIOInterface
 {
   public:
-    virtual ~HwmonIOMock(){};
+    virtual ~HwmonIOMock() {};
 
     MOCK_CONST_METHOD5(read, int64_t(const std::string&, const std::string&,
                                      const std::string&, size_t,
diff --git a/test/sensor_unittest.cpp b/test/sensor_unittest.cpp
index dd57595..b40cdae 100644
--- a/test/sensor_unittest.cpp
+++ b/test/sensor_unittest.cpp
@@ -62,8 +62,8 @@
     EXPECT_CALL(env::mockEnv, get(StrEq("REMOVERCS_temp5")))
         .WillOnce(Return(""));
 
-    auto sensor = std::make_unique<sensor::Sensor>(sensorKey,
-                                                   hwmonio_mock.get(), path);
+    auto sensor =
+        std::make_unique<sensor::Sensor>(sensorKey, hwmonio_mock.get(), path);
     EXPECT_FALSE(sensor == nullptr);
 }
 
@@ -90,8 +90,8 @@
 
     EXPECT_CALL(gMock, build(StrEq("chipA"), StrEq("5")))
         .WillOnce(Invoke([&](const std::string&, const std::string&) {
-        return std::move(handleMock);
-    }));
+            return std::move(handleMock);
+        }));
 
     /* Always calls GAIN and OFFSET, can use ON_CALL instead of EXPECT_CALL */
     EXPECT_CALL(env::mockEnv, get(StrEq("GAIN_temp5"))).WillOnce(Return(""));
@@ -99,8 +99,8 @@
     EXPECT_CALL(env::mockEnv, get(StrEq("REMOVERCS_temp5")))
         .WillOnce(Return(""));
 
-    auto sensor = std::make_unique<sensor::Sensor>(sensorKey,
-                                                   hwmonio_mock.get(), path);
+    auto sensor =
+        std::make_unique<sensor::Sensor>(sensorKey, hwmonio_mock.get(), path);
     EXPECT_FALSE(sensor == nullptr);
 }
 
@@ -126,8 +126,8 @@
     EXPECT_CALL(env::mockEnv, get(StrEq("REMOVERCS_temp5")))
         .WillOnce(Return(""));
 
-    auto sensor = std::make_unique<sensor::Sensor>(sensorKey,
-                                                   hwmonio_mock.get(), path);
+    auto sensor =
+        std::make_unique<sensor::Sensor>(sensorKey, hwmonio_mock.get(), path);
     EXPECT_FALSE(sensor == nullptr);
 
     double startingValue = 1.0;
