clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version.  The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I0f105c3310e87172c65a09a8787a2db5a4041cc0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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/dbus/dbusactiveread.hpp b/dbus/dbusactiveread.hpp
index 46532a6..2edb3cc 100644
--- a/dbus/dbusactiveread.hpp
+++ b/dbus/dbusactiveread.hpp
@@ -22,8 +22,8 @@
     DbusActiveRead(sdbusplus::bus_t& bus, const std::string& path,
                    const std::string& service,
                    std::unique_ptr<DbusHelperInterface> helper) :
-        ReadInterface(),
-        _bus(bus), _path(path), _service(service), _helper(std::move(helper))
+        ReadInterface(), _bus(bus), _path(path), _service(service),
+        _helper(std::move(helper))
     {}
 
     ReadReturn read(void) override;
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 2a06b30..7905e28 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -84,10 +84,10 @@
 std::vector<std::string> getSelectedProfiles(sdbusplus::bus_t& bus)
 {
     std::vector<std::string> ret;
-    auto mapper = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                      "/xyz/openbmc_project/object_mapper",
-                                      "xyz.openbmc_project.ObjectMapper",
-                                      "GetSubTree");
+    auto mapper =
+        bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                            "/xyz/openbmc_project/object_mapper",
+                            "xyz.openbmc_project.ObjectMapper", "GetSubTree");
     mapper.append("/", 0, std::array<const char*, 1>{thermalControlIface});
     std::unordered_map<
         std::string, std::unordered_map<std::string, std::vector<std::string>>>
@@ -281,8 +281,8 @@
     auto findAttributeName = zone.find(attributeName);
     if (findAttributeName != zone.end())
     {
-        double tmpAttributeValue = std::visit(VariantToDoubleVisitor(),
-                                              zone.at(attributeName));
+        double tmpAttributeValue =
+            std::visit(VariantToDoubleVisitor(), zone.at(attributeName));
         if (tmpAttributeValue >= 1.0)
         {
             value = static_cast<uint64_t>(tmpAttributeValue);
@@ -380,10 +380,10 @@
                                          getPIDAttribute(base, "OutLimitMax"));
     info.pidInfo.outLim.min = std::visit(VariantToDoubleVisitor(),
                                          getPIDAttribute(base, "OutLimitMin"));
-    info.pidInfo.slewNeg = std::visit(VariantToDoubleVisitor(),
-                                      getPIDAttribute(base, "SlewNeg"));
-    info.pidInfo.slewPos = std::visit(VariantToDoubleVisitor(),
-                                      getPIDAttribute(base, "SlewPos"));
+    info.pidInfo.slewNeg =
+        std::visit(VariantToDoubleVisitor(), getPIDAttribute(base, "SlewNeg"));
+    info.pidInfo.slewPos =
+        std::visit(VariantToDoubleVisitor(), getPIDAttribute(base, "SlewPos"));
 
     bool checkHysterWithSetpt = false;
     double negativeHysteresis = 0;
@@ -401,18 +401,18 @@
     }
     if (findNeg != base.end())
     {
-        negativeHysteresis = std::visit(VariantToDoubleVisitor(),
-                                        findNeg->second);
+        negativeHysteresis =
+            std::visit(VariantToDoubleVisitor(), findNeg->second);
     }
     if (findPos != base.end())
     {
-        positiveHysteresis = std::visit(VariantToDoubleVisitor(),
-                                        findPos->second);
+        positiveHysteresis =
+            std::visit(VariantToDoubleVisitor(), findPos->second);
     }
     if (findDerivative != base.end())
     {
-        derivativeCoeff = std::visit(VariantToDoubleVisitor(),
-                                     findDerivative->second);
+        derivativeCoeff =
+            std::visit(VariantToDoubleVisitor(), findDerivative->second);
     }
 
     info.pidInfo.checkHysterWithSetpt = checkHysterWithSetpt;
@@ -432,16 +432,16 @@
 
     createMatches(bus, timer);
 
-    auto mapper = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                      "/xyz/openbmc_project/object_mapper",
-                                      "xyz.openbmc_project.ObjectMapper",
-                                      "GetSubTree");
-    mapper.append("/", 0,
-                  std::array<const char*, 6>{
-                      objectManagerInterface, pidConfigurationInterface,
-                      pidZoneConfigurationInterface,
-                      stepwiseConfigurationInterface, sensorInterface,
-                      defaultPwmInterface});
+    auto mapper =
+        bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                            "/xyz/openbmc_project/object_mapper",
+                            "xyz.openbmc_project.ObjectMapper", "GetSubTree");
+    mapper.append(
+        "/", 0,
+        std::array<const char*, 6>{
+            objectManagerInterface, pidConfigurationInterface,
+            pidZoneConfigurationInterface, stepwiseConfigurationInterface,
+            sensorInterface, defaultPwmInterface});
     std::unordered_map<
         std::string, std::unordered_map<std::string, std::vector<std::string>>>
         respData;
@@ -516,8 +516,8 @@
         catch (const sdbusplus::exception_t&)
         {
             // this shouldn't happen, probably means daemon crashed
-            throw std::runtime_error("Error getting managed objects from " +
-                                     owner.first);
+            throw std::runtime_error(
+                "Error getting managed objects from " + owner.first);
         }
 
         for (auto& pathPair : configuration)
@@ -562,8 +562,8 @@
                 for (const std::string& profile : profiles)
                 {
                     if (std::find(selectedProfiles.begin(),
-                                  selectedProfiles.end(),
-                                  profile) != selectedProfiles.end())
+                                  selectedProfiles.end(), profile) !=
+                        selectedProfiles.end())
                     {
                         found = true;
                         break;
@@ -908,11 +908,11 @@
                     offsetType =
                         std::get<std::string>(findSetpointOffset->second);
                     if (std::find(thresholds::types.begin(),
-                                  thresholds::types.end(),
-                                  offsetType) == thresholds::types.end())
+                                  thresholds::types.end(), offsetType) ==
+                        thresholds::types.end())
                     {
-                        throw std::runtime_error("Unsupported type: " +
-                                                 offsetType);
+                        throw std::runtime_error(
+                            "Unsupported type: " + offsetType);
                     }
                 }
 
diff --git a/dbus/dbushelper.cpp b/dbus/dbushelper.cpp
index 038e784..6c1e1c0 100644
--- a/dbus/dbushelper.cpp
+++ b/dbus/dbushelper.cpp
@@ -43,10 +43,10 @@
 std::string DbusHelper::getService(const std::string& intf,
                                    const std::string& path)
 {
-    auto mapper = _bus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                       "/xyz/openbmc_project/object_mapper",
-                                       "xyz.openbmc_project.ObjectMapper",
-                                       "GetObject");
+    auto mapper =
+        _bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                             "/xyz/openbmc_project/object_mapper",
+                             "xyz.openbmc_project.ObjectMapper", "GetObject");
 
     mapper.append(path);
     mapper.append(std::vector<std::string>({intf}));
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index 0963736..aa4cbaf 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -93,9 +93,8 @@
     std::unique_ptr<DbusHelperInterface> helper,
     const SensorProperties& settings, bool failed, const std::string& path,
     const std::shared_ptr<DbusPassiveRedundancy>& redundancy) :
-    ReadInterface(),
-    _signal(bus, getMatch(path), dbusHandleSignal, this), _id(id),
-    _helper(std::move(helper)), _failed(failed), path(path),
+    ReadInterface(), _signal(bus, getMatch(path), dbusHandleSignal, this),
+    _id(id), _helper(std::move(helper)), _failed(failed), path(path),
     redundancy(redundancy)
 
 {
@@ -277,8 +276,8 @@
         auto valPropMap = msgData.find("Value");
         if (valPropMap != msgData.end())
         {
-            double value = std::visit(VariantToDoubleVisitor(),
-                                      valPropMap->second);
+            double value =
+                std::visit(VariantToDoubleVisitor(), valPropMap->second);
 
             owner->updateValue(value, false);
         }
diff --git a/dbus/dbuspassiveredundancy.cpp b/dbus/dbuspassiveredundancy.cpp
index 640e587..fa8ce58 100644
--- a/dbus/dbuspassiveredundancy.cpp
+++ b/dbus/dbuspassiveredundancy.cpp
@@ -50,56 +50,57 @@
           "type='signal',member='PropertiesChanged',arg0namespace='" +
               std::string(redundancy::interface) + "'",
           std::move([this](sdbusplus::message_t& message) {
-    std::string objectName;
-    std::unordered_map<std::string,
-                       std::variant<std::string, std::vector<std::string>>>
-        result;
-    try
-    {
-        message.read(objectName, result);
-    }
-    catch (const sdbusplus::exception_t&)
-    {
-        std::cerr << "Error reading match data";
-        return;
-    }
-    auto findStatus = result.find("Status");
-    if (findStatus == result.end())
-    {
-        return;
-    }
-    std::string status = std::get<std::string>(findStatus->second);
+              std::string objectName;
+              std::unordered_map<
+                  std::string,
+                  std::variant<std::string, std::vector<std::string>>>
+                  result;
+              try
+              {
+                  message.read(objectName, result);
+              }
+              catch (const sdbusplus::exception_t&)
+              {
+                  std::cerr << "Error reading match data";
+                  return;
+              }
+              auto findStatus = result.find("Status");
+              if (findStatus == result.end())
+              {
+                  return;
+              }
+              std::string status = std::get<std::string>(findStatus->second);
 
-    auto methodCall =
-        passiveBus.new_method_call(message.get_sender(), message.get_path(),
-                                   properties::interface, properties::get);
-    methodCall.append(redundancy::interface, redundancy::collection);
-    std::variant<std::vector<std::string>> collection;
+              auto methodCall = passiveBus.new_method_call(
+                  message.get_sender(), message.get_path(),
+                  properties::interface, properties::get);
+              methodCall.append(redundancy::interface, redundancy::collection);
+              std::variant<std::vector<std::string>> collection;
 
-    try
-    {
-        auto reply = passiveBus.call(methodCall);
-        reply.read(collection);
-    }
-    catch (const sdbusplus::exception_t&)
-    {
-        std::cerr << "Error reading match data";
-        return;
-    }
+              try
+              {
+                  auto reply = passiveBus.call(methodCall);
+                  reply.read(collection);
+              }
+              catch (const sdbusplus::exception_t&)
+              {
+                  std::cerr << "Error reading match data";
+                  return;
+              }
 
-    auto data = std::get<std::vector<std::string>>(collection);
-    if (status.rfind("Failed") != std::string::npos)
-    {
-        failed.insert(data.begin(), data.end());
-    }
-    else
-    {
-        for (const auto& d : data)
-        {
-            failed.erase(d);
-        }
-    }
-})),
+              auto data = std::get<std::vector<std::string>>(collection);
+              if (status.rfind("Failed") != std::string::npos)
+              {
+                  failed.insert(data.begin(), data.end());
+              }
+              else
+              {
+                  for (const auto& d : data)
+                  {
+                      failed.erase(d);
+                  }
+              }
+          })),
     passiveBus(bus)
 {
     populateFailures();
@@ -141,9 +142,9 @@
     {
         for (const auto& [owner, _] : interfaceDict)
         {
-            auto call = passiveBus.new_method_call(owner.c_str(), path.c_str(),
-                                                   properties::interface,
-                                                   properties::getAll);
+            auto call = passiveBus.new_method_call(
+                owner.c_str(), path.c_str(), properties::interface,
+                properties::getAll);
             call.append(redundancy::interface);
 
             std::unordered_map<
diff --git a/dbus/dbuswrite.cpp b/dbus/dbuswrite.cpp
index 9531546..baae941 100644
--- a/dbus/dbuswrite.cpp
+++ b/dbus/dbuswrite.cpp
@@ -78,9 +78,9 @@
         }
     }
     auto writeBus = sdbusplus::bus::new_default();
-    auto mesg = writeBus.new_method_call(connectionName.c_str(), path.c_str(),
-                                         "org.freedesktop.DBus.Properties",
-                                         "Set");
+    auto mesg =
+        writeBus.new_method_call(connectionName.c_str(), path.c_str(),
+                                 "org.freedesktop.DBus.Properties", "Set");
     mesg.append(pwmInterface, "Target",
                 std::variant<uint64_t>(static_cast<uint64_t>(ovalue)));
 
@@ -103,10 +103,9 @@
     return;
 }
 
-std::unique_ptr<WriteInterface>
-    DbusWrite::createDbusWrite(const std::string& path, int64_t min,
-                               int64_t max,
-                               std::unique_ptr<DbusHelperInterface> helper)
+std::unique_ptr<WriteInterface> DbusWrite::createDbusWrite(
+    const std::string& path, int64_t min, int64_t max,
+    std::unique_ptr<DbusHelperInterface> helper)
 {
     std::string connectionName;
 
@@ -141,9 +140,9 @@
         }
     }
     auto writeBus = sdbusplus::bus::new_default();
-    auto mesg = writeBus.new_method_call(connectionName.c_str(), path.c_str(),
-                                         "org.freedesktop.DBus.Properties",
-                                         "Set");
+    auto mesg =
+        writeBus.new_method_call(connectionName.c_str(), path.c_str(),
+                                 "org.freedesktop.DBus.Properties", "Set");
     mesg.append(pwmInterface, "Target",
                 std::variant<uint64_t>(static_cast<uint64_t>(value)));
 
diff --git a/dbus/dbuswrite.hpp b/dbus/dbuswrite.hpp
index 1beac27..9aec84c 100644
--- a/dbus/dbuswrite.hpp
+++ b/dbus/dbuswrite.hpp
@@ -37,8 +37,7 @@
 
     DbusWritePercent(const std::string& path, int64_t min, int64_t max,
                      const std::string& connectionName) :
-        WriteInterface(min, max),
-        path(path), connectionName(connectionName)
+        WriteInterface(min, max), path(path), connectionName(connectionName)
     {}
 
     void write(double value) override;
@@ -59,8 +58,7 @@
 
     DbusWrite(const std::string& path, int64_t min, int64_t max,
               const std::string& connectionName) :
-        WriteInterface(min, max),
-        path(path), connectionName(connectionName)
+        WriteInterface(min, max), path(path), connectionName(connectionName)
     {}
 
     void write(double value) override;
diff --git a/ipmi/main_ipmi.cpp b/ipmi/main_ipmi.cpp
index 8e58b25..d1eed13 100644
--- a/ipmi/main_ipmi.cpp
+++ b/ipmi/main_ipmi.cpp
@@ -48,8 +48,8 @@
         oem::obmcOemNumber, oem::Cmd::fanManualCmd);
 
     using namespace std::placeholders;
-    router->registerHandler(oem::obmcOemNumber, oem::Cmd::fanManualCmd,
-                            std::bind(pid_control::ipmi::manualModeControl,
-                                      &pid_control::ipmi::handler, _1, _2, _3,
-                                      _4));
+    router->registerHandler(
+        oem::obmcOemNumber, oem::Cmd::fanManualCmd,
+        std::bind(pid_control::ipmi::manualModeControl,
+                  &pid_control::ipmi::handler, _1, _2, _3, _4));
 }
diff --git a/ipmi/manualcmds.cpp b/ipmi/manualcmds.cpp
index 0025d59..d9c9c49 100644
--- a/ipmi/manualcmds.cpp
+++ b/ipmi/manualcmds.cpp
@@ -39,9 +39,8 @@
 static constexpr auto manualProperty = "Manual";
 static constexpr auto failsafeProperty = "FailSafe";
 
-ipmi_ret_t ZoneControlIpmiHandler::getFailsafeModeState(const uint8_t* reqBuf,
-                                                        uint8_t* replyBuf,
-                                                        size_t* dataLen)
+ipmi_ret_t ZoneControlIpmiHandler::getFailsafeModeState(
+    const uint8_t* reqBuf, uint8_t* replyBuf, size_t* dataLen)
 {
     bool current;
 
@@ -53,8 +52,8 @@
     const auto request =
         reinterpret_cast<const struct FanCtrlRequest*>(&reqBuf[0]);
 
-    ipmi_ret_t rc = _control->getFanCtrlProperty(request->zone, &current,
-                                                 failsafeProperty);
+    ipmi_ret_t rc =
+        _control->getFanCtrlProperty(request->zone, &current, failsafeProperty);
     if (rc)
     {
         return rc;
@@ -71,9 +70,8 @@
  *   <arg name="properties" direction="out" type="a{sv}"/>
  * </method>
  */
-ipmi_ret_t ZoneControlIpmiHandler::getManualModeState(const uint8_t* reqBuf,
-                                                      uint8_t* replyBuf,
-                                                      size_t* dataLen)
+ipmi_ret_t ZoneControlIpmiHandler::getManualModeState(
+    const uint8_t* reqBuf, uint8_t* replyBuf, size_t* dataLen)
 {
     bool current;
 
@@ -85,8 +83,8 @@
     const auto request =
         reinterpret_cast<const struct FanCtrlRequest*>(&reqBuf[0]);
 
-    ipmi_ret_t rc = _control->getFanCtrlProperty(request->zone, &current,
-                                                 manualProperty);
+    ipmi_ret_t rc =
+        _control->getFanCtrlProperty(request->zone, &current, manualProperty);
     if (rc)
     {
         return rc;
@@ -123,10 +121,9 @@
 }
 
 /* Three command packages: get, set true, set false */
-ipmi_ret_t manualModeControl(ZoneControlIpmiHandler* handler,
-                             [[maybe_unused]] ipmi_cmd_t cmd,
-                             const uint8_t* reqBuf, uint8_t* replyCmdBuf,
-                             size_t* dataLen)
+ipmi_ret_t manualModeControl(
+    ZoneControlIpmiHandler* handler, [[maybe_unused]] ipmi_cmd_t cmd,
+    const uint8_t* reqBuf, uint8_t* replyCmdBuf, size_t* dataLen)
 {
     // FanCtrlRequest is the smaller of the requests, so it's at a minimum.
     if (*dataLen < sizeof(struct FanCtrlRequest))
diff --git a/main.cpp b/main.cpp
index c83aa9f..76c5d19 100644
--- a/main.cpp
+++ b/main.cpp
@@ -143,8 +143,8 @@
         {
             auto jsonData = parseValidateJson(path);
             sensorConfig = buildSensorsFromJson(jsonData);
-            std::tie(zoneConfig,
-                     zoneDetailsConfig) = buildPIDsFromJson(jsonData);
+            std::tie(zoneConfig, zoneDetailsConfig) =
+                buildPIDsFromJson(jsonData);
         }
         catch (const std::exception& e)
         {
@@ -163,8 +163,8 @@
     }
 
     state::mgmr = buildSensors(sensorConfig, passiveBus, hostBus);
-    state::zones = buildZones(zoneConfig, zoneDetailsConfig, state::mgmr,
-                              modeControlBus);
+    state::zones =
+        buildZones(zoneConfig, zoneDetailsConfig, state::mgmr, modeControlBus);
 
     if (0 == state::zones.size())
     {
diff --git a/pid/buildjson.cpp b/pid/buildjson.cpp
index ddfeb71..feb3bb8 100644
--- a/pid/buildjson.cpp
+++ b/pid/buildjson.cpp
@@ -57,8 +57,8 @@
         findMissingAcceptable->get_to(missingAcceptableNames);
     }
 
-    c.inputs = spliceInputs(inputNames, inputTempToMargin,
-                            missingAcceptableNames);
+    c.inputs =
+        spliceInputs(inputNames, inputTempToMargin, missingAcceptableNames);
 
     /* TODO: We need to handle parsing other PID controller configurations.
      * We can do that by checking for different keys and making the decision
diff --git a/pid/fancontroller.cpp b/pid/fancontroller.cpp
index fc26243..378ef9b 100644
--- a/pid/fancontroller.cpp
+++ b/pid/fancontroller.cpp
@@ -28,10 +28,9 @@
 namespace pid_control
 {
 
-std::unique_ptr<PIDController>
-    FanController::createFanPid(ZoneInterface* owner, const std::string& id,
-                                const std::vector<std::string>& inputs,
-                                const ec::pidinfo& initial)
+std::unique_ptr<PIDController> FanController::createFanPid(
+    ZoneInterface* owner, const std::string& id,
+    const std::vector<std::string>& inputs, const ec::pidinfo& initial)
 {
     if (inputs.size() == 0)
     {
diff --git a/pid/fancontroller.hpp b/pid/fancontroller.hpp
index c2b76b9..700f651 100644
--- a/pid/fancontroller.hpp
+++ b/pid/fancontroller.hpp
@@ -19,15 +19,14 @@
 class FanController : public PIDController
 {
   public:
-    static std::unique_ptr<PIDController>
-        createFanPid(ZoneInterface* owner, const std::string& id,
-                     const std::vector<std::string>& inputs,
-                     const ec::pidinfo& initial);
+    static std::unique_ptr<PIDController> createFanPid(
+        ZoneInterface* owner, const std::string& id,
+        const std::vector<std::string>& inputs, const ec::pidinfo& initial);
 
     FanController(const std::string& id, const std::vector<std::string>& inputs,
                   ZoneInterface* owner) :
-        PIDController(id, owner),
-        _inputs(inputs), _direction(FanSpeedDirection::NEUTRAL)
+        PIDController(id, owner), _inputs(inputs),
+        _direction(FanSpeedDirection::NEUTRAL)
     {}
     ~FanController();
     double inputProc(void) override;
diff --git a/pid/stepwisecontroller.hpp b/pid/stepwisecontroller.hpp
index a3b3965..5a8dc3b 100644
--- a/pid/stepwisecontroller.hpp
+++ b/pid/stepwisecontroller.hpp
@@ -24,8 +24,7 @@
     StepwiseController(const std::string& id,
                        const std::vector<std::string>& inputs,
                        ZoneInterface* owner) :
-        Controller(),
-        _owner(owner), _id(id), _inputs(inputs)
+        Controller(), _owner(owner), _id(id), _inputs(inputs)
     {}
 
     double inputProc(void) override;
diff --git a/pid/thermalcontroller.cpp b/pid/thermalcontroller.cpp
index ddb5893..cf8564b 100644
--- a/pid/thermalcontroller.cpp
+++ b/pid/thermalcontroller.cpp
@@ -48,8 +48,8 @@
 
 bool isThermalType(const std::string& typeString)
 {
-    static const std::vector<std::string> thermalTypes = {"temp", "margin",
-                                                          "power", "powersum"};
+    static const std::vector<std::string> thermalTypes = {
+        "temp", "margin", "power", "powersum"};
     return std::count(thermalTypes.begin(), thermalTypes.end(), typeString);
 }
 
@@ -128,10 +128,10 @@
 
                 if (debugEnabled)
                 {
-                    std::cerr << "Converting temp to margin: temp "
-                              << cachedValue << ", Tjmax "
-                              << in.convertMarginZero << ", margin "
-                              << marginValue << "\n";
+                    std::cerr
+                        << "Converting temp to margin: temp " << cachedValue
+                        << ", Tjmax " << in.convertMarginZero << ", margin "
+                        << marginValue << "\n";
                 }
 
                 cachedValue = marginValue;
diff --git a/pid/thermalcontroller.hpp b/pid/thermalcontroller.hpp
index ac551d2..b199047 100644
--- a/pid/thermalcontroller.hpp
+++ b/pid/thermalcontroller.hpp
@@ -53,8 +53,7 @@
     ThermalController(const std::string& id,
                       const std::vector<pid_control::conf::SensorInput>& inputs,
                       const ThermalType& type, ZoneInterface* owner) :
-        PIDController(id, owner),
-        _inputs(inputs), type(type)
+        PIDController(id, owner), _inputs(inputs), type(type)
     {}
 
     double inputProc(void) override;
diff --git a/pid/zone.cpp b/pid/zone.cpp
index 5332efe..39ddc6d 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -617,9 +617,8 @@
     return _maximumSetPointName;
 }
 
-void DbusPidZone::updateThermalPowerDebugInterface(std::string pidName,
-                                                   std::string leader,
-                                                   double input, double output)
+void DbusPidZone::updateThermalPowerDebugInterface(
+    std::string pidName, std::string leader, double input, double output)
 {
     if (leader.empty())
     {
diff --git a/pid/zone_interface.hpp b/pid/zone_interface.hpp
index 31f3256..52639f8 100644
--- a/pid/zone_interface.hpp
+++ b/pid/zone_interface.hpp
@@ -115,10 +115,9 @@
     virtual void processThermals(void) = 0;
 
     /** Update thermal/power debug dbus properties */
-    virtual void updateThermalPowerDebugInterface(std::string pidName,
-                                                  std::string leader,
-                                                  double input,
-                                                  double output) = 0;
+    virtual void updateThermalPowerDebugInterface(
+        std::string pidName, std::string leader, double input,
+        double output) = 0;
 };
 
 } // namespace pid_control
diff --git a/sensors/host.cpp b/sensors/host.cpp
index ae63896..51d38a4 100644
--- a/sensors/host.cpp
+++ b/sensors/host.cpp
@@ -33,13 +33,12 @@
     }
 }
 
-std::unique_ptr<Sensor> HostSensor::createTemp(const std::string& name,
-                                               int64_t timeout,
-                                               sdbusplus::bus_t& bus,
-                                               const char* objPath, bool defer)
+std::unique_ptr<Sensor> HostSensor::createTemp(
+    const std::string& name, int64_t timeout, sdbusplus::bus_t& bus,
+    const char* objPath, bool defer)
 {
-    auto sensor = std::make_unique<HostSensor>(name, timeout, bus, objPath,
-                                               defer);
+    auto sensor =
+        std::make_unique<HostSensor>(name, timeout, bus, objPath, defer);
     sensor->value(0);
 
     // DegreesC and value of 0 are the defaults at present, therefore testing
diff --git a/sensors/host.hpp b/sensors/host.hpp
index 83b9889..b97b137 100644
--- a/sensors/host.hpp
+++ b/sensors/host.hpp
@@ -39,10 +39,9 @@
 class HostSensor : public Sensor, public ValueObject
 {
   public:
-    static std::unique_ptr<Sensor> createTemp(const std::string& name,
-                                              int64_t timeout,
-                                              sdbusplus::bus_t& bus,
-                                              const char* objPath, bool defer);
+    static std::unique_ptr<Sensor>
+        createTemp(const std::string& name, int64_t timeout,
+                   sdbusplus::bus_t& bus, const char* objPath, bool defer);
 
     HostSensor(const std::string& name, int64_t timeout, sdbusplus::bus_t& bus,
                const char* objPath, bool defer) :
diff --git a/sensors/pluggable.hpp b/sensors/pluggable.hpp
index 0dc1c71..bd5bc1f 100644
--- a/sensors/pluggable.hpp
+++ b/sensors/pluggable.hpp
@@ -18,8 +18,8 @@
     PluggableSensor(const std::string& name, int64_t timeout,
                     std::unique_ptr<ReadInterface> reader,
                     std::unique_ptr<WriteInterface> writer) :
-        Sensor(name, timeout),
-        _reader(std::move(reader)), _writer(std::move(writer))
+        Sensor(name, timeout), _reader(std::move(reader)),
+        _writer(std::move(writer))
     {}
 
     ReadReturn read(void) override;
diff --git a/test/dbus_active_unittest.cpp b/test/dbus_active_unittest.cpp
index 562dd73..c9f663e 100644
--- a/test/dbus_active_unittest.cpp
+++ b/test/dbus_active_unittest.cpp
@@ -45,10 +45,10 @@
         .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                              [[maybe_unused]] const std::string& path,
                              SensorProperties* prop) {
-        prop->scale = -3;
-        prop->value = 10000;
-        prop->unit = "x";
-    }));
+            prop->scale = -3;
+            prop->value = 10000;
+            prop->unit = "x";
+        }));
 
     DbusActiveRead ar(bus_mock, path, service, std::move(helper));
 
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 29c73dc..9120336 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -79,13 +79,13 @@
             .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                                  [[maybe_unused]] const std::string& path,
                                  SensorProperties* prop) {
-            prop->scale = _scale;
-            prop->value = _value;
-            prop->unit = "x";
-            prop->min = 0;
-            prop->max = 0;
-            prop->available = true;
-        }));
+                prop->scale = _scale;
+                prop->value = _value;
+                prop->unit = "x";
+                prop->min = 0;
+                prop->max = 0;
+                prop->available = true;
+            }));
         EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
@@ -168,18 +168,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = Value;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = Value;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -206,10 +206,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        int64_t* s = static_cast<int64_t*>(p);
-        *s = xValue;
-        return 0;
-    }));
+            int64_t* s = static_cast<int64_t*>(p);
+            *s = xValue;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -241,18 +241,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = Scale;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = Scale;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -279,10 +279,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'x', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        int64_t* s = static_cast<int64_t*>(p);
-        *s = xScale;
-        return 0;
-    }));
+            int64_t* s = static_cast<int64_t*>(p);
+            *s = xScale;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -312,18 +312,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = criticalAlarm;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = criticalAlarm;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -356,10 +356,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = alarm;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = alarm;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -389,18 +389,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = criticalAlarm;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = criticalAlarm;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -433,10 +433,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = alarm;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = alarm;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -466,18 +466,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = property;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = property;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -510,10 +510,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = asserted;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = asserted;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -545,18 +545,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = property;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = property;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -589,10 +589,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = asserted;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = asserted;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -621,13 +621,13 @@
             .WillOnce(Invoke([&]([[maybe_unused]] const std::string& service,
                                  [[maybe_unused]] const std::string& path,
                                  SensorProperties* prop) {
-            prop->scale = _scale;
-            prop->value = _value;
-            prop->unit = "x";
-            prop->min = 0;
-            prop->max = 0;
-            prop->available = true;
-        }));
+                prop->scale = _scale;
+                prop->value = _value;
+                prop->unit = "x";
+                prop->min = 0;
+                prop->max = 0;
+                prop->available = true;
+            }));
         EXPECT_CALL(*helper, thresholdsAsserted(StrEq("asdf"), StrEq(path)))
             .WillOnce(Return(false));
 
@@ -669,18 +669,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = property;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = property;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -713,10 +713,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = asserted;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = asserted;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
@@ -750,18 +750,18 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 's', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        // Read the first parameter, the string.
-        *s = intf;
-        return 0;
-    }))
+            const char** s = static_cast<const char**>(p);
+            // Read the first parameter, the string.
+            *s = intf;
+            return 0;
+        }))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        const char** s = static_cast<const char**>(p);
-        *s = property;
-        // Read the string in the pair (dictionary).
-        return 0;
-    }));
+            const char** s = static_cast<const char**>(p);
+            *s = property;
+            // Read the string in the pair (dictionary).
+            return 0;
+        }));
 
     // std::map
     EXPECT_CALL(sdbus_mock,
@@ -794,10 +794,10 @@
     EXPECT_CALL(sdbus_mock, sd_bus_message_read_basic(IsNull(), 'b', NotNull()))
         .WillOnce(Invoke([&]([[maybe_unused]] sd_bus_message* m,
                              [[maybe_unused]] char type, void* p) {
-        bool* s = static_cast<bool*>(p);
-        *s = asserted;
-        return 0;
-    }));
+            bool* s = static_cast<bool*>(p);
+            *s = asserted;
+            return 0;
+        }));
 
     EXPECT_CALL(sdbus_mock, sd_bus_message_exit_container(IsNull()))
         .WillOnce(Return(0))  /* variant. */
diff --git a/test/helpers.hpp b/test/helpers.hpp
index 378a4ae..4d3faea 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -66,9 +66,9 @@
                                        [[maybe_unused]] const char* path,
                                        [[maybe_unused]] const char* interface,
                                        const char** names) {
-            EXPECT_STREQ(properties[(*index)++].c_str(), names[0]);
-            return 0;
-        }));
+                EXPECT_STREQ(properties[(*index)++].c_str(), names[0]);
+                return 0;
+            }));
     }
 
     return;
diff --git a/test/pid_thermalcontroller_unittest.cpp b/test/pid_thermalcontroller_unittest.cpp
index 8abedf5..b4b1e5d 100644
--- a/test/pid_thermalcontroller_unittest.cpp
+++ b/test/pid_thermalcontroller_unittest.cpp
@@ -118,8 +118,8 @@
 
     ZoneMock z;
 
-    std::vector<pid_control::conf::SensorInput> inputs = {{"fleeting0"},
-                                                          {"fleeting1"}};
+    std::vector<pid_control::conf::SensorInput> inputs = {
+        {"fleeting0"}, {"fleeting1"}};
     double setpoint = 10.0;
     ec::pidinfo initial;
 
@@ -140,8 +140,8 @@
 
     ZoneMock z;
 
-    std::vector<pid_control::conf::SensorInput> inputs = {{"fleeting0"},
-                                                          {"fleeting1"}};
+    std::vector<pid_control::conf::SensorInput> inputs = {
+        {"fleeting0"}, {"fleeting1"}};
     double setpoint = 10.0;
     ec::pidinfo initial;
 
@@ -162,8 +162,8 @@
 
     ZoneMock z;
 
-    std::vector<pid_control::conf::SensorInput> inputs = {{"fleeting0"},
-                                                          {"fleeting1"}};
+    std::vector<pid_control::conf::SensorInput> inputs = {
+        {"fleeting0"}, {"fleeting1"}};
     double setpoint = 10.0;
     ec::pidinfo initial;
 
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 1f6e672..3e8077c 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -68,8 +68,8 @@
                     properties, &d);
 
     std::string sensorname = "temp1";
-    std::string pidsensorpath = "/xyz/openbmc_project/settings/fanctrl/zone1/" +
-                                sensorname;
+    std::string pidsensorpath =
+        "/xyz/openbmc_project/settings/fanctrl/zone1/" + sensorname;
 
     double de;
     std::vector<std::string> propertiesenable;
@@ -154,8 +154,8 @@
 
     std::string sensorname = "temp1";
     std::string sensorType = "temp";
-    std::string pidsensorpath = "/xyz/openbmc_project/settings/fanctrl/zone1/" +
-                                sensorname;
+    std::string pidsensorpath =
+        "/xyz/openbmc_project/settings/fanctrl/zone1/" + sensorname;
 
     std::unique_ptr<DbusPidZone> zone;
 };
@@ -190,9 +190,9 @@
         .WillOnce(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_STREQ("Enable", names[0]);
-        return 0;
-    }));
+                EXPECT_STREQ("Enable", names[0]);
+                return 0;
+            }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -248,9 +248,9 @@
         .WillOnce(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_STREQ("Enable", names[0]);
-        return 0;
-    }));
+                EXPECT_STREQ("Enable", names[0]);
+                return 0;
+            }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -292,9 +292,9 @@
         .WillOnce(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_STREQ("Enable", names[0]);
-        return 0;
-    }));
+                EXPECT_STREQ("Enable", names[0]);
+                return 0;
+            }));
 
     zone->addPidControlProcess(sensorname, sensorType, setpoint,
                                bus_mock_enable, pidsensorpath.c_str(), defer);
@@ -362,13 +362,13 @@
     std::string name1 = "temp1";
     int64_t timeout = 1;
 
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "temp2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -414,13 +414,13 @@
     std::string name1 = "fan1";
     int64_t timeout = 2;
 
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "fan2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -462,13 +462,13 @@
     int64_t timeout = 1;
 
     std::string name1 = "temp1";
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "temp2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -524,13 +524,13 @@
     int64_t timeout = 1;
 
     std::string name1 = "temp1";
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "temp2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -620,13 +620,13 @@
     std::string name1 = "fan1";
     int64_t timeout = 2;
 
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "fan2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -673,13 +673,13 @@
     std::string name1 = "fan1";
     int64_t timeout = 2;
 
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string name2 = "fan2";
-    std::unique_ptr<Sensor> sensor2 = std::make_unique<SensorMock>(name2,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor2 =
+        std::make_unique<SensorMock>(name2, timeout);
     SensorMock* sensor_ptr2 = reinterpret_cast<SensorMock*>(sensor2.get());
 
     std::string type = "unchecked";
@@ -732,8 +732,8 @@
     int64_t timeout = 1;
 
     std::string name1 = "temp1";
-    std::unique_ptr<Sensor> sensor1 = std::make_unique<SensorMock>(name1,
-                                                                   timeout);
+    std::unique_ptr<Sensor> sensor1 =
+        std::make_unique<SensorMock>(name1, timeout);
     SensorMock* sensor_ptr1 = reinterpret_cast<SensorMock*>(sensor1.get());
 
     std::string type = "unchecked";
@@ -807,9 +807,9 @@
         .WillOnce(Invoke(
             [&]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_STREQ("Manual", names[0]);
-        return 0;
-    }));
+                EXPECT_STREQ("Manual", names[0]);
+                return 0;
+            }));
 
     // Method under test will set the manual mode to true and broadcast this
     // change on dbus.
diff --git a/test/sensor_host_unittest.cpp b/test/sensor_host_unittest.cpp
index cb5ede4..e9800cf 100644
--- a/test/sensor_host_unittest.cpp
+++ b/test/sensor_host_unittest.cpp
@@ -51,8 +51,8 @@
                 sd_bus_emit_object_removed(IsNull(), StrEq(objPath)))
         .WillOnce(Return(0));
 
-    std::unique_ptr<Sensor> s = HostSensor::createTemp(name, timeout, bus_mock,
-                                                       objPath, defer);
+    std::unique_ptr<Sensor> s =
+        HostSensor::createTemp(name, timeout, bus_mock, objPath, defer);
 }
 
 TEST(HostSensorTest, VerifyWriteThenReadMatches)
@@ -77,8 +77,8 @@
                 sd_bus_emit_object_removed(IsNull(), StrEq(objPath)))
         .WillOnce(Return(0));
 
-    std::unique_ptr<Sensor> s = HostSensor::createTemp(name, timeout, bus_mock,
-                                                       objPath, defer);
+    std::unique_ptr<Sensor> s =
+        HostSensor::createTemp(name, timeout, bus_mock, objPath, defer);
 
     // Value is updated from dbus calls only (normally).
     HostSensor* hs = static_cast<HostSensor*>(s.get());
@@ -93,9 +93,9 @@
         .WillOnce(Invoke(
             [=]([[maybe_unused]] sd_bus* bus, [[maybe_unused]] const char* path,
                 [[maybe_unused]] const char* interface, const char** names) {
-        EXPECT_STREQ("Value", names[0]);
-        return 0;
-    }));
+                EXPECT_STREQ("Value", names[0]);
+                return 0;
+            }));
 
     std::chrono::high_resolution_clock::time_point t1 =
         std::chrono::high_resolution_clock::now();
diff --git a/test/sensor_manager_unittest.cpp b/test/sensor_manager_unittest.cpp
index b5b67c7..85865a8 100644
--- a/test/sensor_manager_unittest.cpp
+++ b/test/sensor_manager_unittest.cpp
@@ -53,8 +53,8 @@
     std::string name = "name";
     std::string type = "invalid";
     int64_t timeout = 1;
-    std::unique_ptr<Sensor> sensor = std::make_unique<SensorMock>(name,
-                                                                  timeout);
+    std::unique_ptr<Sensor> sensor =
+        std::make_unique<SensorMock>(name, timeout);
     Sensor* sensor_ptr = sensor.get();
 
     s.addSensor(type, name, std::move(sensor));