clang-format: copy latest and re-format

clang-format-17 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: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 7c47bcc..bade59e 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -176,7 +176,7 @@
                 node = node->NextSiblingElement("node");
             }
         }
-        },
+    },
         processName, objectPath, "org.freedesktop.DBus.Introspectable",
         "Introspect");
 }
@@ -223,10 +223,10 @@
                 {
                     propertyJson = val;
                 }
-                },
+            },
                 value);
         }
-        });
+    });
 }
 
 // Find any results that weren't picked up by ObjectManagers, to be
@@ -347,7 +347,7 @@
                             {
                                 propertyJson = val;
                             }
-                            },
+                        },
                             property.second);
                     }
                 }
@@ -362,7 +362,7 @@
                 }
             }
         }
-        });
+    });
 }
 
 inline void findObjectManagerPathForEnumerate(
@@ -395,7 +395,7 @@
                 }
             }
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetAncestors", objectName,
@@ -469,7 +469,7 @@
                     transaction->objectPath, connection.first, transaction);
             }
         }
-        });
+    });
 }
 
 // Structure for storing data on an in progress action
@@ -1487,10 +1487,9 @@
                         }
 
                         crow::connections::systemBus->async_send(
-                            m,
-                            [transaction,
-                             returnType](const boost::system::error_code& ec2,
-                                         sdbusplus::message_t& m2) {
+                            m, [transaction, returnType](
+                                   const boost::system::error_code& ec2,
+                                   sdbusplus::message_t& m2) {
                             if (ec2)
                             {
                                 transaction->methodFailed = true;
@@ -1515,7 +1514,7 @@
                             transaction->methodPassed = true;
 
                             handleMethodResponse(transaction, m2, returnType);
-                            });
+                        });
                         break;
                     }
                     methodNode = methodNode->NextSiblingElement("method");
@@ -1523,7 +1522,7 @@
             }
             interfaceNode = interfaceNode->NextSiblingElement("interface");
         }
-        },
+    },
         connectionName, transaction->path,
         "org.freedesktop.DBus.Introspectable", "Introspect");
 }
@@ -1596,7 +1595,7 @@
         {
             findActionOnInterface(transaction, object.first);
         }
-        });
+    });
 }
 
 inline void handleDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1629,7 +1628,7 @@
         {
             findActionOnInterface(transaction, object.first);
         }
-        });
+    });
 }
 
 inline void handleList(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1652,7 +1651,7 @@
             asyncResp->res.jsonValue["message"] = "200 OK";
             asyncResp->res.jsonValue["data"] = objectPaths;
         }
-        });
+    });
 }
 
 inline void handleEnumerate(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1689,7 +1688,7 @@
         // Add the data for the path passed in to the results
         // as if GetSubTree returned it, and continue on enumerating
         getObjectAndEnumerate(transaction);
-        });
+    });
 }
 
 inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1742,58 +1741,58 @@
                     m, [asyncResp, response,
                         propertyName](const boost::system::error_code& ec2,
                                       sdbusplus::message_t& msg) {
-                        if (ec2)
+                    if (ec2)
+                    {
+                        BMCWEB_LOG_ERROR("Bad dbus request error: {}", ec2);
+                    }
+                    else
+                    {
+                        nlohmann::json properties;
+                        int r = convertDBusToJSON("a{sv}", msg, properties);
+                        if (r < 0)
                         {
-                            BMCWEB_LOG_ERROR("Bad dbus request error: {}", ec2);
+                            BMCWEB_LOG_ERROR("convertDBusToJSON failed");
                         }
                         else
                         {
-                            nlohmann::json properties;
-                            int r = convertDBusToJSON("a{sv}", msg, properties);
-                            if (r < 0)
+                            for (const auto& prop : properties.items())
                             {
-                                BMCWEB_LOG_ERROR("convertDBusToJSON failed");
-                            }
-                            else
-                            {
-                                for (const auto& prop : properties.items())
-                                {
-                                    // if property name is empty, or
-                                    // matches our search query, add it
-                                    // to the response json
+                                // if property name is empty, or
+                                // matches our search query, add it
+                                // to the response json
 
-                                    if (propertyName->empty())
-                                    {
-                                        (*response)[prop.key()] =
-                                            std::move(prop.value());
-                                    }
-                                    else if (prop.key() == *propertyName)
-                                    {
-                                        *response = std::move(prop.value());
-                                    }
+                                if (propertyName->empty())
+                                {
+                                    (*response)[prop.key()] =
+                                        std::move(prop.value());
+                                }
+                                else if (prop.key() == *propertyName)
+                                {
+                                    *response = std::move(prop.value());
                                 }
                             }
                         }
-                        if (response.use_count() == 1)
+                    }
+                    if (response.use_count() == 1)
+                    {
+                        if (!propertyName->empty() && response->empty())
                         {
-                            if (!propertyName->empty() && response->empty())
-                            {
-                                setErrorResponse(
-                                    asyncResp->res,
-                                    boost::beast::http::status::not_found,
-                                    propNotFoundDesc, notFoundMsg);
-                            }
-                            else
-                            {
-                                asyncResp->res.jsonValue["status"] = "ok";
-                                asyncResp->res.jsonValue["message"] = "200 OK";
-                                asyncResp->res.jsonValue["data"] = *response;
-                            }
+                            setErrorResponse(
+                                asyncResp->res,
+                                boost::beast::http::status::not_found,
+                                propNotFoundDesc, notFoundMsg);
                         }
-                    });
+                        else
+                        {
+                            asyncResp->res.jsonValue["status"] = "ok";
+                            asyncResp->res.jsonValue["message"] = "200 OK";
+                            asyncResp->res.jsonValue["data"] = *response;
+                        }
+                    }
+                });
             }
         }
-        });
+    });
 }
 
 struct AsyncPutRequest
@@ -1975,10 +1974,9 @@
                                     return;
                                 }
                                 crow::connections::systemBus->async_send(
-                                    m,
-                                    [transaction](
-                                        const boost::system::error_code& ec,
-                                        sdbusplus::message_t& m2) {
+                                    m, [transaction](
+                                           const boost::system::error_code& ec,
+                                           sdbusplus::message_t& m2) {
                                     BMCWEB_LOG_DEBUG("sent");
                                     if (ec)
                                     {
@@ -2002,18 +2000,18 @@
                                         transaction->asyncResp->res
                                             .jsonValue["data"] = nullptr;
                                     }
-                                    });
+                                });
                             }
                         }
                         propNode = propNode->NextSiblingElement("property");
                     }
                     ifaceNode = ifaceNode->NextSiblingElement("interface");
                 }
-                },
+            },
                 connectionName, transaction->objectPath,
                 "org.freedesktop.DBus.Introspectable", "Introspect");
         }
-        });
+    });
 }
 
 inline void handleDBusUrl(const crow::Request& req,
@@ -2195,7 +2193,7 @@
 
                 interface = interface->NextSiblingElement("interface");
             }
-            },
+        },
             processName, objectPath, "org.freedesktop.DBus.Introspectable",
             "Introspect");
     }
@@ -2361,17 +2359,17 @@
                         m, [&propertyItem,
                             asyncResp](const boost::system::error_code& ec2,
                                        sdbusplus::message_t& msg) {
-                            if (ec2)
-                            {
-                                return;
-                            }
+                        if (ec2)
+                        {
+                            return;
+                        }
 
-                            convertDBusToJSON("v", msg, propertyItem);
-                        });
+                        convertDBusToJSON("v", msg, propertyItem);
+                    });
                 }
                 property = property->NextSiblingElement("property");
             }
-            },
+        },
             processName, objectPath, "org.freedesktop.DBus.Introspectable",
             "Introspect");
     }
@@ -2427,7 +2425,7 @@
         bus["name"] = "system";
         asyncResp->res.jsonValue["busses"] = std::move(buses);
         asyncResp->res.jsonValue["status"] = "ok";
-        });
+    });
 
     BMCWEB_ROUTE(app, "/bus/system/")
         .privileges({{"Login"}})
@@ -2458,7 +2456,7 @@
         crow::connections::systemBus->async_method_call(
             std::move(myCallback), "org.freedesktop.DBus", "/",
             "org.freedesktop.DBus", "ListNames");
-        });
+    });
 
     BMCWEB_ROUTE(app, "/list/")
         .privileges({{"Login"}})
@@ -2466,7 +2464,7 @@
             [](const crow::Request&,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         handleList(asyncResp, "/");
-        });
+    });
 
     BMCWEB_ROUTE(app, "/xyz/<path>")
         .privileges({{"Login"}})
@@ -2476,7 +2474,7 @@
                const std::string& path) {
         std::string objectPath = "/xyz/" + path;
         handleDBusUrl(req, asyncResp, objectPath);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/xyz/<path>")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -2487,7 +2485,7 @@
                const std::string& path) {
         std::string objectPath = "/xyz/" + path;
         handleDBusUrl(req, asyncResp, objectPath);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/org/<path>")
         .privileges({{"Login"}})
@@ -2497,7 +2495,7 @@
                const std::string& path) {
         std::string objectPath = "/org/" + path;
         handleDBusUrl(req, asyncResp, objectPath);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/org/<path>")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -2508,7 +2506,7 @@
                const std::string& path) {
         std::string objectPath = "/org/" + path;
         handleDBusUrl(req, asyncResp, objectPath);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/download/dump/<str>/")
         .privileges({{"ConfigureManager"}})
@@ -2572,7 +2570,7 @@
         }
         asyncResp->res.result(boost::beast::http::status::not_found);
         return;
-        });
+    });
 
     BMCWEB_ROUTE(app, "/bus/system/<str>/")
         .privileges({{"Login"}})
@@ -2582,7 +2580,7 @@
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                const std::string& connection) {
         introspectObjects(connection, "/", asyncResp);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/bus/system/<str>/<path>")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})