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: I509c8567baedea7c86787f2e880900da13ebfc9f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/ipmisnoop/ipmisnoop.hpp b/ipmisnoop/ipmisnoop.hpp
index 7e4fb46..77311b2 100644
--- a/ipmisnoop/ipmisnoop.hpp
+++ b/ipmisnoop/ipmisnoop.hpp
@@ -3,9 +3,7 @@
 #include "lpcsnoop/snoop.hpp"
 
 #include <boost/asio.hpp>
-#include <filesystem>
 #include <gpiod.hpp>
-#include <iostream>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/asio/object_server.hpp>
 #include <sdbusplus/asio/property.hpp>
@@ -14,6 +12,9 @@
 #include <xyz/openbmc_project/Chassis/Buttons/HostSelector/server.hpp>
 #include <xyz/openbmc_project/State/Boot/Raw/server.hpp>
 
+#include <filesystem>
+#include <iostream>
+
 const std::string ipmiSnoopObject = "/xyz/openbmc_project/state/boot/raw";
 
 const int hostParseIdx = 3;
@@ -43,9 +44,9 @@
 {
     const std::string propertyName = "Position";
 
-    auto method =
-        bus.new_method_call(selectorService.c_str(), selectorObject.c_str(),
-                            "org.freedesktop.DBus.Properties", "Get");
+    auto method = bus.new_method_call(selectorService.c_str(),
+                                      selectorObject.c_str(),
+                                      "org.freedesktop.DBus.Properties", "Get");
     method.append(selectorIface.c_str(), propertyName);
 
     try
@@ -71,76 +72,75 @@
             sdbusplus::bus::match::rules::propertiesChanged(objPath, rawIface),
 
             [this, &bus](sdbusplus::message_t& msg) {
-                using primarycode_t = uint64_t;
-                using secondarycode_t = std::vector<uint8_t>;
-                using postcode_t = std::tuple<primarycode_t, secondarycode_t>;
+        using primarycode_t = uint64_t;
+        using secondarycode_t = std::vector<uint8_t>;
+        using postcode_t = std::tuple<primarycode_t, secondarycode_t>;
 
-                /* sevenSegmentLedEnabled flag is set when GPIO pins are not
-                there 7 seg display for fewer platforms. So, the code for
-                postcode dispay and Get Selector position can be skipped in
-                those platforms.
-                */
-                if (!sevenSegmentLedEnabled)
+        /* sevenSegmentLedEnabled flag is set when GPIO pins are not
+        there 7 seg display for fewer platforms. So, the code for
+        postcode dispay and Get Selector position can be skipped in
+        those platforms.
+        */
+        if (!sevenSegmentLedEnabled)
+        {
+            return;
+        }
+
+        std::string objectName;
+        std::string InterfaceName;
+        std::map<std::string, std::variant<postcode_t>> msgData;
+        msg.read(InterfaceName, msgData);
+
+        std::filesystem::path name(msg.get_path());
+        objectName = name.filename();
+
+        std::string hostNumStr = objectName.substr(hostParseIdx);
+        size_t hostNum = std::stoi(hostNumStr);
+
+        size_t position = getSelectorPosition(bus);
+
+        if (position > maxPosition)
+        {
+            std::cerr << "Invalid position. Position should be 1 to 4 "
+                         "for all hosts "
+                      << std::endl;
+        }
+
+        // Check if it was the Value property that changed.
+        auto valPropMap = msgData.find("Value");
+        if (valPropMap == msgData.end())
+        {
+            std::cerr << "Value property is not found " << std::endl;
+            return;
+        }
+        uint64_t postcode =
+            std::get<0>(std::get<postcode_t>(valPropMap->second));
+
+        if (postcode <= maxPostcode)
+        {
+            if (position == hostNum)
+            {
+                uint8_t postcode_8bit =
+                    static_cast<uint8_t>(postcode & 0x0000FF);
+
+                // write postcode into seven segment display
+                if (postCodeDisplay(postcode_8bit) < 0)
                 {
-                    return;
+                    fprintf(stderr, "Error in display the postcode\n");
                 }
-
-                std::string objectName;
-                std::string InterfaceName;
-                std::map<std::string, std::variant<postcode_t>> msgData;
-                msg.read(InterfaceName, msgData);
-
-                std::filesystem::path name(msg.get_path());
-                objectName = name.filename();
-
-                std::string hostNumStr = objectName.substr(hostParseIdx);
-                size_t hostNum = std::stoi(hostNumStr);
-
-                size_t position = getSelectorPosition(bus);
-
-                if (position > maxPosition)
-                {
-                    std::cerr << "Invalid position. Position should be 1 to 4 "
-                                 "for all hosts "
-                              << std::endl;
-                }
-
-                // Check if it was the Value property that changed.
-                auto valPropMap = msgData.find("Value");
-                if (valPropMap == msgData.end())
-                {
-                    std::cerr << "Value property is not found " << std::endl;
-                    return;
-                }
-                uint64_t postcode =
-                    std::get<0>(std::get<postcode_t>(valPropMap->second));
-
-                if (postcode <= maxPostcode)
-                {
-                    if (position == hostNum)
-                    {
-                        uint8_t postcode_8bit =
-                            static_cast<uint8_t>(postcode & 0x0000FF);
-
-                        // write postcode into seven segment display
-                        if (postCodeDisplay(postcode_8bit) < 0)
-                        {
-                            fprintf(stderr, "Error in display the postcode\n");
-                        }
-                    }
-                    else
-                    {
-                        fprintf(stderr, "Host Selector Position and host "
-                                        "number is not matched..\n");
-                    }
-                }
-                else
-                {
-                    fprintf(stderr, "invalid postcode value \n");
-                }
+            }
+            else
+            {
+                fprintf(stderr, "Host Selector Position and host "
+                                "number is not matched..\n");
+            }
+        }
+        else
+        {
+            fprintf(stderr, "invalid postcode value \n");
+        }
             })
-    {
-    }
+    {}
 
     sdbusplus::bus_t& bus;
     sdbusplus::bus::match_t propertiesChangedSignalRaw;