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: Idb72665dbadfa8afd569a2e0e254d84f0a2108d3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/activation.cpp b/src/activation.cpp
index 9112c3f..1ecfd47 100644
--- a/src/activation.cpp
+++ b/src/activation.cpp
@@ -4,11 +4,12 @@
 
 #include "utils.hpp"
 
-#include <cassert>
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 
+#include <cassert>
+#include <filesystem>
+
 namespace phosphor
 {
 namespace software
@@ -274,8 +275,8 @@
 
 bool Activation::isCompatible(const std::string& psuInventoryPath)
 {
-    auto service =
-        utils::getService(bus, psuInventoryPath.c_str(), ASSET_IFACE);
+    auto service = utils::getService(bus, psuInventoryPath.c_str(),
+                                     ASSET_IFACE);
     auto psuManufacturer = utils::getProperty<std::string>(
         bus, service.c_str(), psuInventoryPath.c_str(), ASSET_IFACE,
         MANUFACTURER);
diff --git a/src/activation.hpp b/src/activation.hpp
index 6af99cd..fc32827 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -7,7 +7,6 @@
 #include "types.hpp"
 #include "version.hpp"
 
-#include <queue>
 #include <sdbusplus/server.hpp>
 #include <xyz/openbmc_project/Association/Definitions/server.hpp>
 #include <xyz/openbmc_project/Common/FilePath/server.hpp>
@@ -16,6 +15,8 @@
 #include <xyz/openbmc_project/Software/ActivationProgress/server.hpp>
 #include <xyz/openbmc_project/Software/ExtendedVersion/server.hpp>
 
+#include <queue>
+
 class TestActivation;
 
 namespace phosphor
diff --git a/src/item_updater.cpp b/src/item_updater.cpp
index 1b38e13..6f774cb 100644
--- a/src/item_updater.cpp
+++ b/src/item_updater.cpp
@@ -4,12 +4,13 @@
 
 #include "utils.hpp"
 
-#include <cassert>
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <cassert>
+#include <filesystem>
+
 namespace
 {
 constexpr auto MANIFEST_VERSION = "version";
@@ -109,8 +110,8 @@
                                    activationState, associations, filePath);
         activations.emplace(versionId, std::move(activation));
 
-        auto versionPtr =
-            createVersionObject(path, versionId, version, purpose);
+        auto versionPtr = createVersionObject(path, versionId, version,
+                                              purpose);
         versions.emplace(versionId, std::move(versionPtr));
     }
     return;
@@ -462,8 +463,8 @@
                     objPath, versionId, extVersion, activationState, {}, path);
                 activations.emplace(versionId, std::move(activation));
 
-                auto versionPtr =
-                    createVersionObject(objPath, versionId, version, purpose);
+                auto versionPtr = createVersionObject(objPath, versionId,
+                                                      version, purpose);
                 versions.emplace(versionId, std::move(versionPtr));
             }
             else
diff --git a/src/item_updater.hpp b/src/item_updater.hpp
index 0f998c8..b0e04eb 100644
--- a/src/item_updater.hpp
+++ b/src/item_updater.hpp
@@ -8,12 +8,13 @@
 #include "utils.hpp"
 #include "version.hpp"
 
-#include <filesystem>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/server.hpp>
 #include <xyz/openbmc_project/Association/Definitions/server.hpp>
 #include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
 
+#include <filesystem>
+
 class TestItemUpdater;
 
 namespace phosphor
@@ -35,9 +36,10 @@
 /** @class ItemUpdater
  *  @brief Manages the activation of the PSU version items.
  */
-class ItemUpdater : public ItemUpdaterInherit,
-                    public AssociationInterface,
-                    public ActivationListener
+class ItemUpdater :
+    public ItemUpdaterInherit,
+    public AssociationInterface,
+    public ActivationListener
 {
     friend class ::TestItemUpdater;
 
diff --git a/src/main.cpp b/src/main.cpp
index b15923a..ecadaa0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5,6 +5,7 @@
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/manager.hpp>
+
 #include <system_error>
 
 int main(int /* argc */, char* /* argv */[])
diff --git a/src/utils.cpp b/src/utils.cpp
index 0626543..09ed5d3 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -4,9 +4,10 @@
 
 #include <openssl/evp.h>
 
+#include <phosphor-logging/log.hpp>
+
 #include <algorithm>
 #include <fstream>
-#include <phosphor-logging/log.hpp>
 #include <sstream>
 
 using namespace phosphor::logging;
@@ -24,7 +25,7 @@
 namespace internal
 {
 template <typename... Ts>
-std::string concat_string(Ts const&... ts)
+std::string concat_string(const Ts&... ts)
 {
     std::stringstream s;
     ((s << ts << " "), ...) << std::endl;
@@ -34,7 +35,7 @@
 // Helper function to run command
 // Returns return code and the stdout
 template <typename... Ts>
-std::pair<int, std::string> exec(Ts const&... ts)
+std::pair<int, std::string> exec(const Ts&... ts)
 {
     std::array<char, 512> buffer;
     std::string cmd = concat_string(ts...);
@@ -176,8 +177,8 @@
 {
     return std::find_if(assocs.begin(), assocs.end(),
                         [&psuInventoryPath](const auto& assoc) {
-                            return psuInventoryPath == std::get<2>(assoc);
-                        }) != assocs.end();
+        return psuInventoryPath == std::get<2>(assoc);
+           }) != assocs.end();
 }
 
 any Utils::getPropertyImpl(sdbusplus::bus_t& bus, const char* service,
diff --git a/src/utils.hpp b/src/utils.hpp
index 13c7b62..446f024 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -2,8 +2,9 @@
 
 #include "types.hpp"
 
-#include <any>
 #include <sdbusplus/bus.hpp>
+
+#include <any>
 #include <set>
 #include <string>
 #include <vector>
@@ -140,8 +141,8 @@
     T getProperty(sdbusplus::bus_t& bus, const char* service, const char* path,
                   const char* interface, const char* propertyName) const
     {
-        any result =
-            getPropertyImpl(bus, service, path, interface, propertyName);
+        any result = getPropertyImpl(bus, service, path, interface,
+                                     propertyName);
         auto value = any_cast<PropertyType>(result);
         return std::get<T>(value);
     }
diff --git a/src/version.cpp b/src/version.cpp
index b6ca139..58abf79 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -2,14 +2,15 @@
 
 #include "item_updater.hpp"
 
-#include <fstream>
-#include <iostream>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
+#include <fstream>
+#include <iostream>
 #include <sstream>
 #include <stdexcept>
 #include <string>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/src/version.hpp b/src/version.hpp
index 37c7e38..021aadd 100644
--- a/src/version.hpp
+++ b/src/version.hpp
@@ -41,8 +41,7 @@
     Delete(sdbusplus::bus_t& bus, const std::string& path, Version& version) :
         DeleteInherit(bus, path.c_str(), action::emit_interface_added),
         version(version)
-    {
-    }
+    {}
 
     /**
      * @brief Delete the D-Bus object.