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/async_resolve.hpp b/include/async_resolve.hpp
index 71d2497..805fbad 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -116,7 +116,7 @@
             }
             // All the resolved data is filled in the endpointList
             handler(ec, endpointList);
-            },
+        },
             "org.freedesktop.resolve1", "/org/freedesktop/resolve1",
             "org.freedesktop.resolve1.Manager", "ResolveHostname", 0, host,
             AF_UNSPEC, flag);
diff --git a/include/cors_preflight.hpp b/include/cors_preflight.hpp
index 43e9073..b727222 100644
--- a/include/cors_preflight.hpp
+++ b/include/cors_preflight.hpp
@@ -14,6 +14,6 @@
                const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&) {
         // An empty body handler that simply returns the headers bmcweb
         // uses This allows browsers to do their CORS preflight checks
-        });
+    });
 }
 } // namespace cors_preflight
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 2682717..25f0c7f 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -114,141 +114,140 @@
         .privileges({{"Login"}})
         .websocket()
         .onopen([&](crow::websocket::Connection& conn) {
-            BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
-            sessions.try_emplace(&conn);
-        })
+        BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+        sessions.try_emplace(&conn);
+    })
         .onclose([&](crow::websocket::Connection& conn, const std::string&) {
-            sessions.erase(&conn);
-        })
+        sessions.erase(&conn);
+    })
         .onmessage([&](crow::websocket::Connection& conn,
                        const std::string& data, bool) {
-            const auto sessionPair = sessions.find(&conn);
-            if (sessionPair == sessions.end())
+        const auto sessionPair = sessions.find(&conn);
+        if (sessionPair == sessions.end())
+        {
+            conn.close("Internal error");
+        }
+        DbusWebsocketSession& thisSession = sessionPair->second;
+        BMCWEB_LOG_DEBUG("Connection {} received {}", logPtr(&conn), data);
+        nlohmann::json j = nlohmann::json::parse(data, nullptr, false);
+        if (j.is_discarded())
+        {
+            BMCWEB_LOG_ERROR("Unable to parse json data for monitor");
+            conn.close("Unable to parse json request");
+            return;
+        }
+        nlohmann::json::iterator interfaces = j.find("interfaces");
+        if (interfaces != j.end())
+        {
+            thisSession.interfaces.reserve(interfaces->size());
+            for (auto& interface : *interfaces)
             {
-                conn.close("Internal error");
+                const std::string* str =
+                    interface.get_ptr<const std::string*>();
+                if (str != nullptr)
+                {
+                    thisSession.interfaces.insert(*str);
+                }
             }
-            DbusWebsocketSession& thisSession = sessionPair->second;
-            BMCWEB_LOG_DEBUG("Connection {} received {}", logPtr(&conn), data);
-            nlohmann::json j = nlohmann::json::parse(data, nullptr, false);
-            if (j.is_discarded())
+        }
+
+        nlohmann::json::iterator paths = j.find("paths");
+        if (paths == j.end())
+        {
+            BMCWEB_LOG_ERROR("Unable to find paths in json data");
+            conn.close("Unable to find paths in json data");
+            return;
+        }
+
+        size_t interfaceCount = thisSession.interfaces.size();
+        if (interfaceCount == 0)
+        {
+            interfaceCount = 1;
+        }
+        // Reserve our matches upfront.  For each path there is 1 for
+        // interfacesAdded, and InterfaceCount number for
+        // PropertiesChanged
+        thisSession.matches.reserve(thisSession.matches.size() +
+                                    paths->size() * (1U + interfaceCount));
+
+        // These regexes derived on the rules here:
+        // https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
+        static std::regex validPath("^/([A-Za-z0-9_]+/?)*$");
+        static std::regex validInterface(
+            "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)+$");
+
+        for (const auto& thisPath : *paths)
+        {
+            const std::string* thisPathString =
+                thisPath.get_ptr<const std::string*>();
+            if (thisPathString == nullptr)
             {
-                BMCWEB_LOG_ERROR("Unable to parse json data for monitor");
-                conn.close("Unable to parse json request");
+                BMCWEB_LOG_ERROR("subscribe path isn't a string?");
+                conn.close();
                 return;
             }
-            nlohmann::json::iterator interfaces = j.find("interfaces");
-            if (interfaces != j.end())
+            if (!std::regex_match(*thisPathString, validPath))
             {
-                thisSession.interfaces.reserve(interfaces->size());
-                for (auto& interface : *interfaces)
-                {
-                    const std::string* str =
-                        interface.get_ptr<const std::string*>();
-                    if (str != nullptr)
-                    {
-                        thisSession.interfaces.insert(*str);
-                    }
-                }
-            }
-
-            nlohmann::json::iterator paths = j.find("paths");
-            if (paths == j.end())
-            {
-                BMCWEB_LOG_ERROR("Unable to find paths in json data");
-                conn.close("Unable to find paths in json data");
+                BMCWEB_LOG_ERROR("Invalid path name {}", *thisPathString);
+                conn.close();
                 return;
             }
-
-            size_t interfaceCount = thisSession.interfaces.size();
-            if (interfaceCount == 0)
+            std::string propertiesMatchString =
+                ("type='signal',"
+                 "interface='org.freedesktop.DBus.Properties',"
+                 "path_namespace='" +
+                 *thisPathString +
+                 "',"
+                 "member='PropertiesChanged'");
+            // If interfaces weren't specified, add a single match for all
+            // interfaces
+            if (thisSession.interfaces.empty())
             {
-                interfaceCount = 1;
-            }
-            // Reserve our matches upfront.  For each path there is 1 for
-            // interfacesAdded, and InterfaceCount number for
-            // PropertiesChanged
-            thisSession.matches.reserve(thisSession.matches.size() +
-                                        paths->size() * (1U + interfaceCount));
+                BMCWEB_LOG_DEBUG("Creating match {}", propertiesMatchString);
 
-            // These regexes derived on the rules here:
-            // https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
-            static std::regex validPath("^/([A-Za-z0-9_]+/?)*$");
-            static std::regex validInterface(
-                "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)+$");
-
-            for (const auto& thisPath : *paths)
-            {
-                const std::string* thisPathString =
-                    thisPath.get_ptr<const std::string*>();
-                if (thisPathString == nullptr)
-                {
-                    BMCWEB_LOG_ERROR("subscribe path isn't a string?");
-                    conn.close();
-                    return;
-                }
-                if (!std::regex_match(*thisPathString, validPath))
-                {
-                    BMCWEB_LOG_ERROR("Invalid path name {}", *thisPathString);
-                    conn.close();
-                    return;
-                }
-                std::string propertiesMatchString =
-                    ("type='signal',"
-                     "interface='org.freedesktop.DBus.Properties',"
-                     "path_namespace='" +
-                     *thisPathString +
-                     "',"
-                     "member='PropertiesChanged'");
-                // If interfaces weren't specified, add a single match for all
-                // interfaces
-                if (thisSession.interfaces.empty())
-                {
-                    BMCWEB_LOG_DEBUG("Creating match {}",
-                                     propertiesMatchString);
-
-                    thisSession.matches.emplace_back(
-                        std::make_unique<sdbusplus::bus::match_t>(
-                            *crow::connections::systemBus,
-                            propertiesMatchString, onPropertyUpdate, &conn));
-                }
-                else
-                {
-                    // If interfaces were specified, add a match for each
-                    // interface
-                    for (const std::string& interface : thisSession.interfaces)
-                    {
-                        if (!std::regex_match(interface, validInterface))
-                        {
-                            BMCWEB_LOG_ERROR("Invalid interface name {}",
-                                             interface);
-                            conn.close();
-                            return;
-                        }
-                        std::string ifaceMatchString = propertiesMatchString;
-                        ifaceMatchString += ",arg0='";
-                        ifaceMatchString += interface;
-                        ifaceMatchString += "'";
-                        BMCWEB_LOG_DEBUG("Creating match {}", ifaceMatchString);
-                        thisSession.matches.emplace_back(
-                            std::make_unique<sdbusplus::bus::match_t>(
-                                *crow::connections::systemBus, ifaceMatchString,
-                                onPropertyUpdate, &conn));
-                    }
-                }
-                std::string objectManagerMatchString =
-                    ("type='signal',"
-                     "interface='org.freedesktop.DBus.ObjectManager',"
-                     "path_namespace='" +
-                     *thisPathString +
-                     "',"
-                     "member='InterfacesAdded'");
-                BMCWEB_LOG_DEBUG("Creating match {}", objectManagerMatchString);
                 thisSession.matches.emplace_back(
                     std::make_unique<sdbusplus::bus::match_t>(
-                        *crow::connections::systemBus, objectManagerMatchString,
+                        *crow::connections::systemBus, propertiesMatchString,
                         onPropertyUpdate, &conn));
             }
-        });
+            else
+            {
+                // If interfaces were specified, add a match for each
+                // interface
+                for (const std::string& interface : thisSession.interfaces)
+                {
+                    if (!std::regex_match(interface, validInterface))
+                    {
+                        BMCWEB_LOG_ERROR("Invalid interface name {}",
+                                         interface);
+                        conn.close();
+                        return;
+                    }
+                    std::string ifaceMatchString = propertiesMatchString;
+                    ifaceMatchString += ",arg0='";
+                    ifaceMatchString += interface;
+                    ifaceMatchString += "'";
+                    BMCWEB_LOG_DEBUG("Creating match {}", ifaceMatchString);
+                    thisSession.matches.emplace_back(
+                        std::make_unique<sdbusplus::bus::match_t>(
+                            *crow::connections::systemBus, ifaceMatchString,
+                            onPropertyUpdate, &conn));
+                }
+            }
+            std::string objectManagerMatchString =
+                ("type='signal',"
+                 "interface='org.freedesktop.DBus.ObjectManager',"
+                 "path_namespace='" +
+                 *thisPathString +
+                 "',"
+                 "member='InterfacesAdded'");
+            BMCWEB_LOG_DEBUG("Creating match {}", objectManagerMatchString);
+            thisSession.matches.emplace_back(
+                std::make_unique<sdbusplus::bus::match_t>(
+                    *crow::connections::systemBus, objectManagerMatchString,
+                    onPropertyUpdate, &conn));
+        }
+    });
 }
 } // namespace dbus_monitor
 } // namespace crow
diff --git a/include/dbus_privileges.hpp b/include/dbus_privileges.hpp
index 7fb545a..16aae5e 100644
--- a/include/dbus_privileges.hpp
+++ b/include/dbus_privileges.hpp
@@ -181,7 +181,7 @@
             const dbus::utility::DBusPropertiesMap& userInfoMap) mutable {
         afterGetUserInfo(req, asyncResp, rule,
                          std::forward<CallbackFn>(callback), ec, userInfoMap);
-        },
+    },
         "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
         "xyz.openbmc_project.User.Manager", "GetUserInfo", username);
 }
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index a8eefd5..933d733 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -151,7 +151,7 @@
             const boost::system::error_code& ec,
             const dbus::utility::MapperGetObject& objectNames) {
         callback(!ec && !objectNames.empty());
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetObject", path,
@@ -185,7 +185,7 @@
             const boost::system::error_code& ec,
             const MapperGetSubTreePathsResponse& subtreePaths) {
         callback(ec, subtreePaths);
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", path, depth,
@@ -221,7 +221,7 @@
             const boost::system::error_code& ec,
             const MapperGetSubTreePathsResponse& subtreePaths) {
         callback(ec, subtreePaths);
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetAssociatedSubTreePaths",
@@ -238,7 +238,7 @@
         [callback{std::move(callback)}](const boost::system::error_code& ec,
                                         const MapperGetObject& object) {
         callback(ec, object);
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetObject", path, interfaces);
@@ -264,7 +264,7 @@
         [callback{std::move(callback)}](const boost::system::error_code& ec,
                                         const ManagedObjectType& objects) {
         callback(ec, objects);
-        },
+    },
         service, path, "org.freedesktop.DBus.ObjectManager",
         "GetManagedObjects");
 }
diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp
index bb51490..9dd2405 100644
--- a/include/google/google_service_root.hpp
+++ b/include/google/google_service_root.hpp
@@ -110,7 +110,7 @@
             const dbus::utility::MapperGetSubTreeResponse& subtree) {
         hothGetSubtreeCallback(command, asyncResp, rotId, entityHandler, ec,
                                subtree);
-        });
+    });
 }
 
 inline void populateRootOfTrustEntity(
@@ -181,7 +181,7 @@
         [asyncResp{asyncResp}](const boost::system::error_code& ec,
                                const std::vector<uint8_t>& responseBytes) {
         invocationCallback(asyncResp, ec, responseBytes);
-        },
+    },
         resolvedEntity.service, resolvedEntity.object, resolvedEntity.interface,
         "SendHostCommand", bytes);
 }
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index f1a0d3d..6339a6b 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -29,7 +29,7 @@
         BMCWEB_LOG_INFO("Replace HTTPs Certificate Success, "
                         "remove temporary certificate file..");
         remove(certPath.c_str());
-        },
+    },
         "xyz.openbmc_project.Certs.Manager.Server.Https",
         "/xyz/openbmc_project/certs/server/https/1",
         "xyz.openbmc_project.Certs.Replace", "Replace", certPath.string());
diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index 2fd5e14..4f430ae 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -78,8 +78,8 @@
         }
         const auto* knownContentType = std::ranges::find_if(
             contentTypes, [encoding](const ContentTypePair& pair) {
-                return pair.contentTypeString == encoding;
-            });
+            return pair.contentTypeString == encoding;
+        });
 
         if (knownContentType == contentTypes.end())
         {
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index b87cb1e..fd1e2a5 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -695,7 +695,7 @@
             "/ibm/v1/HMC/LockService";
         asyncResp->res.jsonValue["BroadcastService"]["@odata.id"] =
             "/ibm/v1/HMC/BroadcastService";
-        });
+    });
 
     BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -703,7 +703,7 @@
             [](const crow::Request&,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         handleConfigFileList(asyncResp);
-        });
+    });
 
     BMCWEB_ROUTE(app,
                  "/ibm/v1/Host/ConfigFiles/Actions/IBMConfigFiles.DeleteAll")
@@ -712,7 +712,7 @@
             [](const crow::Request&,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         deleteConfigFiles(asyncResp);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles/<str>")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -729,7 +729,7 @@
             return;
         }
         handleFileUrl(req, asyncResp, fileName);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -737,7 +737,7 @@
             [](const crow::Request&,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         getLockServiceData(asyncResp);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.AcquireLock")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -753,7 +753,7 @@
             return;
         }
         handleAcquireLockAPI(req, asyncResp, body);
-        });
+    });
     BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.ReleaseLock")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
         .methods(boost::beast::http::verb::post)(
@@ -783,7 +783,7 @@
             redfish::messages::propertyValueNotInList(asyncResp->res, type,
                                                       "Type");
         }
-        });
+    });
     BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.GetLockList")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
         .methods(boost::beast::http::verb::post)(
@@ -798,7 +798,7 @@
             return;
         }
         handleGetLockListAPI(asyncResp, listSessionIds);
-        });
+    });
 
     BMCWEB_ROUTE(app, "/ibm/v1/HMC/BroadcastService")
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -806,7 +806,7 @@
             [](const crow::Request& req,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         handleBroadcastService(req, asyncResp);
-        });
+    });
 }
 
 } // namespace ibm_mc
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index f5c8110..ef615cb 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -68,8 +68,8 @@
         m.read(path, interfaces);
 
         if (std::ranges::find_if(interfaces, [](const auto& i) {
-                return i.first == "xyz.openbmc_project.Software.Version";
-            }) != interfaces.end())
+            return i.first == "xyz.openbmc_project.Software.Version";
+        }) != interfaces.end())
         {
             timeout.cancel();
             std::string leaf = path.filename();
@@ -115,7 +115,7 @@
             [](const crow::Request& req,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
         uploadImageHandler(req, asyncResp);
-        });
+    });
 }
 } // namespace image_upload
 } // namespace crow
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index d04c19f..0089ae3 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -24,20 +24,20 @@
             boost::asio::ip::make_address("127.0.0.1"), 5900);
         hostSocket.async_connect(
             endpoint, [this, &connIn](const boost::system::error_code& ec) {
-                if (ec)
+            if (ec)
+            {
+                BMCWEB_LOG_ERROR(
+                    "conn:{}, Couldn't connect to KVM socket port: {}",
+                    logPtr(&conn), ec);
+                if (ec != boost::asio::error::operation_aborted)
                 {
-                    BMCWEB_LOG_ERROR(
-                        "conn:{}, Couldn't connect to KVM socket port: {}",
-                        logPtr(&conn), ec);
-                    if (ec != boost::asio::error::operation_aborted)
-                    {
-                        connIn.close("Error in connecting to KVM port");
-                    }
-                    return;
+                    connIn.close("Error in connecting to KVM port");
                 }
+                return;
+            }
 
-                doRead();
-            });
+            doRead();
+        });
     }
 
     void onMessage(const std::string& data)
@@ -102,7 +102,7 @@
             outputBuffer.consume(bytesRead);
 
             doRead();
-            });
+        });
     }
 
     void doWrite()
@@ -152,7 +152,7 @@
             }
 
             doWrite();
-            });
+        });
     }
 
     crow::websocket::Connection& conn;
@@ -175,26 +175,26 @@
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
         .websocket()
         .onopen([](crow::websocket::Connection& conn) {
-            BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+        BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
 
-            if (sessions.size() == maxSessions)
-            {
-                conn.close("Max sessions are already connected");
-                return;
-            }
+        if (sessions.size() == maxSessions)
+        {
+            conn.close("Max sessions are already connected");
+            return;
+        }
 
-            sessions[&conn] = std::make_shared<KvmSession>(conn);
-        })
+        sessions[&conn] = std::make_shared<KvmSession>(conn);
+    })
         .onclose([](crow::websocket::Connection& conn, const std::string&) {
-            sessions.erase(&conn);
-        })
+        sessions.erase(&conn);
+    })
         .onmessage([](crow::websocket::Connection& conn,
                       const std::string& data, bool) {
-            if (sessions[&conn])
-            {
-                sessions[&conn]->onMessage(data);
-            }
-        });
+        if (sessions[&conn])
+        {
+            sessions[&conn]->onMessage(data);
+        }
+    });
 }
 
 } // namespace obmc_kvm
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 5540886..17d57b4 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -164,8 +164,8 @@
                     self2->ux2wsBuf.consume(self2->ux2wsBuf.size());
                     self2->doRead();
                 }
-                });
             });
+        });
     }
 
     void doWrite(std::function<void()>&& onDone)
@@ -211,7 +211,7 @@
                 return;
             }
             onDone();
-            });
+        });
     }
 
     // Keeps UNIX socket endpoint file path
@@ -332,7 +332,7 @@
         [&conn](const boost::system::error_code& ec,
                 const dbus::utility::ManagedObjectType& objects) {
         afterGetManagedObjects(conn, ec, objects);
-        });
+    });
 
     // We need to wait for dbus and the websockets to hook up before data is
     // sent/received.  Tell the core to hold off messages until the sockets are
diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp
index 2dd3edb..fb363be 100644
--- a/include/obmc_console.hpp
+++ b/include/obmc_console.hpp
@@ -71,7 +71,7 @@
                 return;
             }
             self->doWrite();
-            });
+        });
     }
 
     static void afterSendEx(const std::weak_ptr<ConsoleHandler>& weak)
@@ -107,7 +107,7 @@
             std::string_view payload(outputBuffer.data(), bytesRead);
             self->conn.sendEx(crow::websocket::MessageType::Binary, payload,
                               std::bind_front(afterSendEx, weak_from_this()));
-            });
+        });
     }
 
     bool connect(int fd)
@@ -247,7 +247,7 @@
         [&conn](const boost::system::error_code& ec1,
                 const sdbusplus::message::unix_fd& unixfd) {
         connectConsoleSocket(conn, ec1, unixfd);
-        },
+    },
         consoleService, consoleObjPath, "xyz.openbmc_project.Console.Access",
         "Connect");
 }
@@ -299,7 +299,7 @@
         [&conn, consolePath](const boost::system::error_code& ec,
                              const ::dbus::utility::MapperGetObject& objInfo) {
         processConsoleObject(conn, consolePath, ec, objInfo);
-        });
+    });
 }
 
 inline void onMessage(crow::websocket::Connection& conn,
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"}})
diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp
index a8d6a14..13bbdc6 100644
--- a/include/vm_websocket.hpp
+++ b/include/vm_websocket.hpp
@@ -111,7 +111,7 @@
                 return;
             }
             doWrite();
-            });
+        });
     }
 
     void doRead()
@@ -145,7 +145,7 @@
             outputBuffer->consume(bytesRead);
 
             doRead();
-            });
+        });
     }
 
     boost::process::async_pipe pipeOut;
@@ -169,57 +169,57 @@
         .privileges({{"ConfigureComponents", "ConfigureManager"}})
         .websocket()
         .onopen([](crow::websocket::Connection& conn) {
-            BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+        BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
 
-            if (session != nullptr)
-            {
-                conn.close("Session already connected");
-                return;
-            }
+        if (session != nullptr)
+        {
+            conn.close("Session already connected");
+            return;
+        }
 
-            if (handler != nullptr)
-            {
-                conn.close("Handler already running");
-                return;
-            }
+        if (handler != nullptr)
+        {
+            conn.close("Handler already running");
+            return;
+        }
 
-            session = &conn;
+        session = &conn;
 
-            // media is the last digit of the endpoint /vm/0/0. A future
-            // enhancement can include supporting different endpoint values.
-            const char* media = "0";
-            handler = std::make_shared<Handler>(media, conn.getIoContext());
-            handler->connect();
-        })
+        // media is the last digit of the endpoint /vm/0/0. A future
+        // enhancement can include supporting different endpoint values.
+        const char* media = "0";
+        handler = std::make_shared<Handler>(media, conn.getIoContext());
+        handler->connect();
+    })
         .onclose([](crow::websocket::Connection& conn,
                     const std::string& /*reason*/) {
-            if (&conn != session)
-            {
-                return;
-            }
+        if (&conn != session)
+        {
+            return;
+        }
 
-            session = nullptr;
-            handler->doClose();
-            handler->inputBuffer->clear();
-            handler->outputBuffer->clear();
-            handler.reset();
-        })
+        session = nullptr;
+        handler->doClose();
+        handler->inputBuffer->clear();
+        handler->outputBuffer->clear();
+        handler.reset();
+    })
         .onmessage([](crow::websocket::Connection& conn,
                       const std::string& data, bool) {
-            if (data.length() >
-                handler->inputBuffer->capacity() - handler->inputBuffer->size())
-            {
-                BMCWEB_LOG_ERROR("Buffer overrun when writing {} bytes",
-                                 data.length());
-                conn.close("Buffer overrun");
-                return;
-            }
+        if (data.length() >
+            handler->inputBuffer->capacity() - handler->inputBuffer->size())
+        {
+            BMCWEB_LOG_ERROR("Buffer overrun when writing {} bytes",
+                             data.length());
+            conn.close("Buffer overrun");
+            return;
+        }
 
-            boost::asio::buffer_copy(handler->inputBuffer->prepare(data.size()),
-                                     boost::asio::buffer(data));
-            handler->inputBuffer->commit(data.size());
-            handler->doWrite();
-        });
+        boost::asio::buffer_copy(handler->inputBuffer->prepare(data.size()),
+                                 boost::asio::buffer(data));
+        handler->inputBuffer->commit(data.size());
+        handler->doWrite();
+    });
 }
 
 } // namespace obmc_vm