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/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)));