clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Icbc50d46e84ee7ef756705e2b19741439a325074
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index 52ac0a1..d92a3f1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,12 +6,14 @@
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlines: Right
-AlignOperands:   true
-AlignTrailingComments: true
+AlignOperands:  Align
+AlignTrailingComments:
+  Kind: Always
+  OverEmptyLines: 1
 AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: None
+AllowShortFunctionsOnASingleLine: Empty
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
@@ -36,12 +38,13 @@
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
   SplitEmptyNamespace:  false
+BreakAfterAttributes: Never
 BreakBeforeBinaryOperators: None
 BreakBeforeBraces: Custom
 BreakBeforeTernaryOperators: true
 BreakConstructorInitializers: AfterColon
 BreakInheritanceList: AfterColon
-BreakStringLiterals: true
+BreakStringLiterals: false
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
@@ -49,6 +52,7 @@
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
+DeriveLineEnding: false
 DerivePointerAlignment: false
 PointerAlignment: Left
 DisableFormat:   false
@@ -74,9 +78,13 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+InsertNewlineAtEOF: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+LambdaBodyIndentation: OuterScope
+LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
 MaxEmptyLinesToKeep: 1
@@ -84,13 +92,19 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyIndentedWhitespace: 0
+QualifierAlignment: Left
+ReferenceAlignment: Left
 ReflowComments:  true
+RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: Keyword
 SortIncludes:    true
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index f055c11..7bb96f1 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>>>
@@ -151,7 +151,6 @@
 
 int eventHandler(sd_bus_message* m, void* context, sd_bus_error*)
 {
-
     if (context == nullptr || m == nullptr)
     {
         throw std::runtime_error("Invalid match");
@@ -282,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);
@@ -366,10 +365,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"));
 
     double negativeHysteresis = 0;
     double positiveHysteresis = 0;
@@ -381,18 +380,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.negativeHysteresis = negativeHysteresis;
@@ -405,17 +404,16 @@
           std::map<int64_t, conf::PIDConf>& zoneConfig,
           std::map<int64_t, conf::ZoneConfig>& zoneDetailsConfig)
 {
-
     sensorConfig.clear();
     zoneConfig.clear();
     zoneDetailsConfig.clear();
 
     createMatches(bus, timer);
 
-    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*, 6>{
                       objectManagerInterface, pidConfigurationInterface,
@@ -452,7 +450,6 @@
             auto& owner = owners[ownerPair.first];
             for (const std::string& interface : ownerPair.second)
             {
-
                 if (interface == objectManagerInterface)
                 {
                     owner.second = objectPair.first;
diff --git a/dbus/dbushelper.cpp b/dbus/dbushelper.cpp
index 01383cb..54c75ca 100644
--- a/dbus/dbushelper.cpp
+++ b/dbus/dbushelper.cpp
@@ -42,10 +42,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}));
@@ -147,7 +147,6 @@
 bool DbusHelper::thresholdsAsserted(const std::string& service,
                                     const std::string& path)
 {
-
     auto critical = _bus.new_method_call(service.c_str(), path.c_str(),
                                          propertiesintf, "GetAll");
     critical.append(criticalThreshInf);
diff --git a/dbus/dbushelper.hpp b/dbus/dbushelper.hpp
index f65784c..5086826 100644
--- a/dbus/dbushelper.hpp
+++ b/dbus/dbushelper.hpp
@@ -21,8 +21,7 @@
     static constexpr char availabilityIntf[] =
         "xyz.openbmc_project.State.Decorator.Availability";
 
-    explicit DbusHelper(sdbusplus::bus_t bus) : _bus(std::move(bus))
-    {}
+    explicit DbusHelper(sdbusplus::bus_t bus) : _bus(std::move(bus)) {}
     ~DbusHelper() = default;
 
     DbusHelper(const DbusHelper&) = delete;
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index a567e96..6ca0b42 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -275,8 +275,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 f7f82dd..0e186a6 100644
--- a/dbus/dbuspassiveredundancy.cpp
+++ b/dbus/dbuspassiveredundancy.cpp
@@ -49,59 +49,59 @@
     match(bus,
           "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::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);
 
-              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)
+passiveBus(bus)
 {
     populateFailures();
 }
diff --git a/dbus/dbuswrite.cpp b/dbus/dbuswrite.cpp
index 33ba730..9531546 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)));
 
@@ -141,9 +141,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/interfaces.hpp b/interfaces.hpp
index 73ef643..5e99d19 100644
--- a/interfaces.hpp
+++ b/interfaces.hpp
@@ -34,11 +34,9 @@
 class ReadInterface
 {
   public:
-    ReadInterface()
-    {}
+    ReadInterface() {}
 
-    virtual ~ReadInterface()
-    {}
+    virtual ~ReadInterface() {}
 
     virtual ReadReturn read(void) = 0;
 
@@ -55,11 +53,9 @@
 class WriteInterface
 {
   public:
-    WriteInterface(int64_t min, int64_t max) : _min(min), _max(max)
-    {}
+    WriteInterface(int64_t min, int64_t max) : _min(min), _max(max) {}
 
-    virtual ~WriteInterface()
-    {}
+    virtual ~WriteInterface() {}
 
     virtual void write(double value) = 0;
 
diff --git a/ipmi/manualcmds.cpp b/ipmi/manualcmds.cpp
index 0967539..0025d59 100644
--- a/ipmi/manualcmds.cpp
+++ b/ipmi/manualcmds.cpp
@@ -53,8 +53,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;
@@ -85,8 +85,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;
diff --git a/main.cpp b/main.cpp
index bc70506..fc09d8b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -130,8 +130,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)
         {
diff --git a/notimpl/readonly.hpp b/notimpl/readonly.hpp
index 3a2c806..788aebd 100644
--- a/notimpl/readonly.hpp
+++ b/notimpl/readonly.hpp
@@ -10,8 +10,7 @@
 class ReadOnly : public WriteInterface
 {
   public:
-    ReadOnly() : WriteInterface(0, 0)
-    {}
+    ReadOnly() : WriteInterface(0, 0) {}
 
     void write(double value) override;
 };
@@ -19,8 +18,7 @@
 class ReadOnlyNoExcept : public WriteInterface
 {
   public:
-    ReadOnlyNoExcept() : WriteInterface(0, 0)
-    {}
+    ReadOnlyNoExcept() : WriteInterface(0, 0) {}
 
     void write(double value) override;
 };
diff --git a/notimpl/writeonly.hpp b/notimpl/writeonly.hpp
index c3b5323..0561de0 100644
--- a/notimpl/writeonly.hpp
+++ b/notimpl/writeonly.hpp
@@ -9,8 +9,7 @@
 class WriteOnly : public ReadInterface
 {
   public:
-    WriteOnly() : ReadInterface()
-    {}
+    WriteOnly() : ReadInterface() {}
 
     ReadReturn read(void) override;
 };
diff --git a/pid/ec/pid.cpp b/pid/ec/pid.cpp
index 6222f1a..762513a 100644
--- a/pid/ec/pid.cpp
+++ b/pid/ec/pid.cpp
@@ -109,8 +109,8 @@
     coreContext.derivativeTerm = derivativeTerm;
 
     // FF
-    feedFwdTerm =
-        (setpoint + pidinfoptr->feedFwdOffset) * pidinfoptr->feedFwdGain;
+    feedFwdTerm = (setpoint + pidinfoptr->feedFwdOffset) *
+                  pidinfoptr->feedFwdGain;
 
     coreContext.feedFwdTerm = feedFwdTerm;
 
@@ -134,8 +134,8 @@
         if (pidinfoptr->slewNeg != 0.0f)
         {
             // Don't decrease too fast
-            double minOut =
-                pidinfoptr->lastOutput + pidinfoptr->slewNeg * pidinfoptr->ts;
+            double minOut = pidinfoptr->lastOutput +
+                            pidinfoptr->slewNeg * pidinfoptr->ts;
 
             coreContext.minOut = minOut;
 
@@ -147,8 +147,8 @@
         if (pidinfoptr->slewPos != 0.0f)
         {
             // Don't increase too fast
-            double maxOut =
-                pidinfoptr->lastOutput + pidinfoptr->slewPos * pidinfoptr->ts;
+            double maxOut = pidinfoptr->lastOutput +
+                            pidinfoptr->slewPos * pidinfoptr->ts;
 
             coreContext.maxOut = maxOut;
 
diff --git a/pid/ec/pid.hpp b/pid/ec/pid.hpp
index a6b6c4e..378f93c 100644
--- a/pid/ec/pid.hpp
+++ b/pid/ec/pid.hpp
@@ -19,12 +19,12 @@
  */
 typedef struct
 {
-    bool initialized; // has pid been initialized
+    bool initialized;         // has pid been initialized
 
-    double ts;         // sample time in seconds
-    double integral;   // intergal of error
-    double lastOutput; // value of last output
-    double lastError;  // value of last error
+    double ts;                // sample time in seconds
+    double integral;          // intergal of error
+    double lastOutput;        // value of last output
+    double lastError;         // value of last error
 
     double proportionalCoeff; // coeff for P
     double integralCoeff;     // coeff for I
@@ -32,8 +32,8 @@
     double feedFwdOffset;     // offset coeff for feed-forward term
     double feedFwdGain;       // gain for feed-forward term
 
-    limits_t integralLimit; // clamp of integral
-    limits_t outLim;        // clamp of output
+    limits_t integralLimit;   // clamp of integral
+    limits_t outLim;          // clamp of output
     double slewNeg;
     double slewPos;
     double positiveHysteresis;
diff --git a/pid/ec/stepwise.cpp b/pid/ec/stepwise.cpp
index 0065228..c3e61e8 100644
--- a/pid/ec/stepwise.cpp
+++ b/pid/ec/stepwise.cpp
@@ -32,7 +32,6 @@
 
     for (size_t ii = 1; ii < ec::maxStepwisePoints; ii++)
     {
-
         if (std::isnan(info.reading[ii]))
         {
             break;
diff --git a/pid/pidcontroller.hpp b/pid/pidcontroller.hpp
index fcc021c..c3e9999 100644
--- a/pid/pidcontroller.hpp
+++ b/pid/pidcontroller.hpp
@@ -41,8 +41,7 @@
         _pid_info.positiveHysteresis = static_cast<double>(0.0);
     }
 
-    virtual ~PIDController()
-    {}
+    virtual ~PIDController() {}
 
     virtual double inputProc(void) override = 0;
     virtual double setptProc(void) = 0;
diff --git a/sensors/host.cpp b/sensors/host.cpp
index b0e08b1..ae63896 100644
--- a/sensors/host.cpp
+++ b/sensors/host.cpp
@@ -38,8 +38,8 @@
                                                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 efbc17d..83b9889 100644
--- a/sensors/host.hpp
+++ b/sensors/host.hpp
@@ -21,7 +21,6 @@
 
 class ValueHelper : public ValueInterface
 {
-
   public:
     auto operator()() const
     {
diff --git a/sensors/sensor.hpp b/sensors/sensor.hpp
index f5f01c2..a135c50 100644
--- a/sensors/sensor.hpp
+++ b/sensors/sensor.hpp
@@ -31,8 +31,7 @@
         _name(name), _timeout(timeout)
     {}
 
-    virtual ~Sensor()
-    {}
+    virtual ~Sensor() {}
 
     virtual ReadReturn read(void) = 0;
     virtual void write(double value) = 0;
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index 40e68c4..9120336 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -298,7 +298,6 @@
 
 TEST_F(DbusPassiveTestObj, VerifyCriticalThresholdAssert)
 {
-
     // Verifies when a threshold is crossed the sensor goes into error state
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
         .WillOnce(Return(nullptr));
@@ -375,7 +374,6 @@
 
 TEST_F(DbusPassiveTestObj, VerifyCriticalThresholdDeassert)
 {
-
     // Verifies when a threshold is deasserted a failed sensor goes back into
     // the normal state
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
@@ -453,7 +451,6 @@
 
 TEST_F(DbusPassiveTestObj, VerifyAvailableDeassert)
 {
-
     // Verifies when Availble is deasserted && unavailableAsFailed == true,
     // the sensor goes into error state
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
@@ -531,7 +528,6 @@
 
 TEST_F(DbusPassiveTestObj, VerifyAvailableAssert)
 {
-
     // Verifies when Availble is asserted && unavailableAsFailed == true,
     // an error sensor goes back to normal state
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
@@ -658,7 +654,6 @@
 
 TEST_F(DbusPassiveTestUnaSensorNotAsFailedObj, VerifyAvailableDeassert)
 {
-
     // Verifies when Availble is deasserted && unavailableAsFailed == false,
     // the sensor remains at OK state but reading goes to NaN.
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
@@ -738,7 +733,6 @@
 
 TEST_F(DbusPassiveTestUnaSensorNotAsFailedObj, VerifyAvailableAssert)
 {
-
     // Verifies when a sensor's state goes from unavailble to available
     // && unavailableAsFailed == false, this sensor remains at OK state.
     EXPECT_CALL(sdbus_mock, sd_bus_message_ref(IsNull()))
diff --git a/test/pid_thermalcontroller_unittest.cpp b/test/pid_thermalcontroller_unittest.cpp
index ab45661..6069154 100644
--- a/test/pid_thermalcontroller_unittest.cpp
+++ b/test/pid_thermalcontroller_unittest.cpp
@@ -175,7 +175,6 @@
 
 TEST(ThermalControllerTest, NegHysteresis_BehavesAsExpected)
 {
-
     // This test verifies Negative hysteresis behaves as expected by
     // crossing the setpoint and noticing readings don't change until past the
     // hysteresis value
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 3a5871d..8e74367 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -218,13 +218,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";
@@ -270,13 +270,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";
@@ -318,13 +318,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";
@@ -377,13 +377,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";
@@ -430,13 +430,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";
@@ -489,8 +489,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";
@@ -564,9 +564,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 e9800cf..4fe0816 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 85865a8..b5b67c7 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));
diff --git a/test/writeinterface_mock.hpp b/test/writeinterface_mock.hpp
index 0aed48d..669c1d9 100644
--- a/test/writeinterface_mock.hpp
+++ b/test/writeinterface_mock.hpp
@@ -12,8 +12,7 @@
   public:
     virtual ~WriteInterfaceMock() = default;
 
-    WriteInterfaceMock(int64_t min, int64_t max) : WriteInterface(min, max)
-    {}
+    WriteInterfaceMock(int64_t min, int64_t max) : WriteInterface(min, max) {}
 
     MOCK_METHOD1(write, void(double));
 };
diff --git a/util.cpp b/util.cpp
index 5a6336e..411b761 100644
--- a/util.cpp
+++ b/util.cpp
@@ -38,7 +38,6 @@
     std::cout << "{\n";
     for (const auto& pair : sensorConfig)
     {
-
         std::cout << "\t{" << pair.first << ",\n\t\t{";
         std::cout << pair.second.type << ", ";
         std::cout << pair.second.readPath << ", ";