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: I75f89d2959b0f1338c20d72ad669fbdc1d720835
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/async_resp.hpp b/include/async_resp.hpp
index d7f5819..eafaaca 100644
--- a/include/async_resp.hpp
+++ b/include/async_resp.hpp
@@ -16,8 +16,7 @@
 {
   public:
     AsyncResp() = default;
-    explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn))
-    {}
+    explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn)) {}
 
     AsyncResp(const AsyncResp&) = delete;
     AsyncResp(AsyncResp&&) = delete;
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 7110034..18e7822 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -146,8 +146,8 @@
     {
         endIndex = cookieValue.size();
     }
-    std::string_view authKey =
-        cookieValue.substr(startIndex, endIndex - startIndex);
+    std::string_view authKey = cookieValue.substr(startIndex,
+                                                  endIndex - startIndex);
 
     std::shared_ptr<persistent_data::UserSession> sessionOut =
         persistent_data::SessionStore::getInstance().loginSessionByToken(
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index b278882..ba3e5fa 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -125,7 +125,7 @@
 
     std::filesystem::path p1(path);
     int count = -1;
-    for (auto const& element : p1)
+    for (const auto& element : p1)
     {
         if (element.has_filename())
         {
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index ed719d5..fd49b02 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -75,9 +75,9 @@
     const int maxKeySize = 256;
     std::array<char, maxKeySize> cnBuffer{};
 
-    int cnLength =
-        X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName,
-                                  cnBuffer.data(), cnBuffer.size());
+    int cnLength = X509_NAME_get_text_by_NID(X509_get_subject_name(cert),
+                                             NID_commonName, cnBuffer.data(),
+                                             cnBuffer.size());
     if (cnLength == -1)
     {
         BMCWEB_LOG_ERROR << "Failed to read NID_commonName";
diff --git a/include/human_sort.hpp b/include/human_sort.hpp
index 7ab326d..5cb6e56 100644
--- a/include/human_sort.hpp
+++ b/include/human_sort.hpp
@@ -24,7 +24,6 @@
 
 inline int alphanumComp(std::string_view left, std::string_view right)
 {
-
     std::string_view::const_iterator l = left.begin();
     std::string_view::const_iterator r = right.begin();
 
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index fd27ef9..99b9cc3 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -187,7 +187,6 @@
 
 inline RcGetLockList Lock::getLockList(const ListOfSessionIds& listSessionId)
 {
-
     std::vector<std::pair<uint32_t, LockRequests>> lockList;
 
     if (!lockTable.empty())
@@ -241,7 +240,6 @@
 
 inline RcAcquireLock Lock::acquireLock(const LockRequests& lockRequestStructure)
 {
-
     // validate the lock request
 
     for (const auto& lockRecord : lockRequestStructure)
@@ -363,7 +361,6 @@
 
 inline bool Lock::isValidLockRequest(const LockRequest& refLockRecord)
 {
-
     // validate the locktype
 
     if (!((boost::equals(std::get<2>(refLockRecord), "Read") ||
@@ -392,7 +389,6 @@
 
     for (const auto& p : std::get<4>(refLockRecord))
     {
-
         // validate the lock flags
         // Allowed lockflags are locksame,lockall & dontlock
 
@@ -552,7 +548,6 @@
     uint32_t i = 0;
     for (const auto& p : std::get<4>(refLockRecord1))
     {
-
         // return conflict when any of them is try to lock all resources
         // under the current resource level.
         if (boost::equals(p.first, "LockAll") ||
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index e1b7f83..51f5298 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -36,11 +36,11 @@
 constexpr size_t maxSaveareaDirSize =
     25000000; // Allow save area dir size to be max 25MB
 constexpr size_t minSaveareaFileSize =
-    100; // Allow save area file size of minimum 100B
+    100;      // Allow save area file size of minimum 100B
 constexpr size_t maxSaveareaFileSize =
-    500000; // Allow save area file size upto 500KB
+    500000;   // Allow save area file size upto 500KB
 constexpr size_t maxBroadcastMsgSize =
-    1000; // Allow Broadcast message size upto 1KB
+    1000;     // Allow Broadcast message size upto 1KB
 
 inline void handleFilePut(const crow::Request& req,
                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -323,8 +323,8 @@
         return;
     }
 
-    std::string contentDispositionParam =
-        "attachment; filename=\"" + fileID + "\"";
+    std::string contentDispositionParam = "attachment; filename=\"" + fileID +
+                                          "\"";
     asyncResp->res.addHeader(boost::beast::http::field::content_disposition,
                              contentDispositionParam);
     std::string fileData;
@@ -685,7 +685,6 @@
 
 inline void requestRoutes(App& app)
 {
-
     // allowed only for admin
     BMCWEB_ROUTE(app, "/ibm/v1/")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
diff --git a/include/login_routes.hpp b/include/login_routes.hpp
index 00debb5..122e741 100644
--- a/include/login_routes.hpp
+++ b/include/login_routes.hpp
@@ -37,8 +37,8 @@
         // Check if auth was provided by a payload
         if (contentType.starts_with("application/json"))
         {
-            loginCredentials =
-                nlohmann::json::parse(req.body(), nullptr, false);
+            loginCredentials = nlohmann::json::parse(req.body(), nullptr,
+                                                     false);
             if (loginCredentials.is_discarded())
             {
                 BMCWEB_LOG_DEBUG << "Bad json in request";
@@ -77,8 +77,8 @@
                         if (dataIt->size() == 2)
                         {
                             nlohmann::json::iterator userIt2 = dataIt->begin();
-                            nlohmann::json::iterator passIt2 =
-                                dataIt->begin() + 1;
+                            nlohmann::json::iterator passIt2 = dataIt->begin() +
+                                                               1;
                             looksLikePhosphorRest = true;
                             if (userIt2 != dataIt->end() &&
                                 passIt2 != dataIt->end())
@@ -235,8 +235,8 @@
         const auto& session = req.session;
         if (session != nullptr)
         {
-            asyncResp->res.jsonValue["data"] =
-                "User '" + session->username + "' logged out";
+            asyncResp->res.jsonValue["data"] = "User '" + session->username +
+                                               "' logged out";
             asyncResp->res.jsonValue["message"] = "200 OK";
             asyncResp->res.jsonValue["status"] = "ok";
 
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index adeeccb..abc1657 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -274,8 +274,8 @@
                     // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
                     const char* start = buffer + partDataMark;
                     size_t size = i - partDataMark;
-                    mime_fields.rbegin()->content +=
-                        std::string_view(start, size);
+                    mime_fields.rbegin()->content += std::string_view(start,
+                                                                      size);
                 }
                 index++;
             }
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 5bdc4ec..82e3ecd 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -221,7 +221,6 @@
                 }
                 else
                 {
-
                     propertyJson = val;
                 }
                 },
@@ -344,7 +343,6 @@
                             }
                             else
                             {
-
                                 propertyJson = val;
                             }
                             },
@@ -1678,8 +1676,8 @@
         [objectPath, asyncResp](
             const boost::system::error_code& ec,
             const dbus::utility::MapperGetSubTreeResponse& objectNames) {
-        auto transaction =
-            std::make_shared<InProgressEnumerateData>(objectPath, asyncResp);
+        auto transaction = std::make_shared<InProgressEnumerateData>(objectPath,
+                                                                     asyncResp);
 
         transaction->subtree =
             std::make_shared<dbus::utility::MapperGetSubTreeResponse>(
@@ -2030,7 +2028,6 @@
                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                           std::string& objectPath)
 {
-
     // If accessing a single attribute, fill in and update objectPath,
     // otherwise leave destProperty blank
     std::string destProperty;
@@ -2572,8 +2569,8 @@
                 asyncResp->res.result(boost::beast::http::status::not_found);
                 return;
             }
-            std::string contentDispositionParam =
-                "attachment; filename=\"" + dumpFileName + "\"";
+            std::string contentDispositionParam = "attachment; filename=\"" +
+                                                  dumpFileName + "\"";
 
             asyncResp->res.addHeader(
                 boost::beast::http::field::content_disposition,
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 99a1a0e..6bb6a7a 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -417,8 +417,7 @@
     AuthConfigMethods authMethodsConfig;
 
   private:
-    SessionStore() : timeoutInSeconds(1800)
-    {}
+    SessionStore() : timeoutInSeconds(1800) {}
 };
 
 } // namespace persistent_data
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 73d0b83..7152841 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -21,8 +21,8 @@
 
 namespace ensuressl
 {
-constexpr char const* trustStorePath = "/etc/ssl/certs/authority";
-constexpr char const* x509Comment = "Generated from OpenBMC service";
+constexpr const char* trustStorePath = "/etc/ssl/certs/authority";
+constexpr const char* x509Comment = "Generated from OpenBMC service";
 static void initOpenssl();
 static EVP_PKEY* createEcKey();
 
@@ -144,8 +144,8 @@
                 }
             }
 #else
-            EVP_PKEY_CTX* pkeyCtx =
-                EVP_PKEY_CTX_new_from_pkey(nullptr, pkey, nullptr);
+            EVP_PKEY_CTX* pkeyCtx = EVP_PKEY_CTX_new_from_pkey(nullptr, pkey,
+                                                               nullptr);
 
             if (pkeyCtx == nullptr)
             {
@@ -158,7 +158,6 @@
             }
             else
             {
-
                 std::cerr << "Key not valid error number " << ERR_get_error()
                           << "\n";
             }