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: Ia4966a0790437eb0fc011c747f3be2a52884e4d8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/config_parser.cpp b/src/config_parser.cpp
index 25c4d11..afa563a 100644
--- a/src/config_parser.cpp
+++ b/src/config_parser.cpp
@@ -3,14 +3,15 @@
 #include <fmt/compile.h>
 #include <fmt/format.h>
 
-#include <functional>
-#include <iterator>
-#include <stdexcept>
 #include <stdplus/exception.hpp>
 #include <stdplus/fd/atomic.hpp>
 #include <stdplus/fd/create.hpp>
 #include <stdplus/fd/fmt.hpp>
 #include <stdplus/fd/line.hpp>
+
+#include <functional>
+#include <iterator>
+#include <stdexcept>
 #include <string>
 #include <utility>
 
@@ -156,8 +157,7 @@
 
     inline Parse(const fs::path& filename) :
         filename(filename), section(nullptr), lineno(0)
-    {
-    }
+    {}
 
     void pumpSection(std::string_view line)
     {
@@ -264,8 +264,7 @@
         }
     }
     catch (const stdplus::exception::Eof&)
-    {
-    }
+    {}
     catch (const std::system_error& e)
     {
         fileExists = false;
diff --git a/src/config_parser.hpp b/src/config_parser.hpp
index 5df8d98..2d0bb1f 100644
--- a/src/config_parser.hpp
+++ b/src/config_parser.hpp
@@ -31,19 +31,16 @@
 {
   public:
     struct unchecked
-    {
-    };
+    {};
 
     template <typename... Args>
     constexpr Checked(Args&&... args) : t(conCheck(std::forward<Args>(args)...))
-    {
-    }
+    {}
 
     template <typename... Args>
     constexpr Checked(unchecked, Args&&... args) :
         t(std::forward<Args>(args)...)
-    {
-    }
+    {}
 
     constexpr const T& get() const noexcept
     {
diff --git a/src/dhcp_configuration.cpp b/src/dhcp_configuration.cpp
index 3465721..8843c7c 100644
--- a/src/dhcp_configuration.cpp
+++ b/src/dhcp_configuration.cpp
@@ -6,11 +6,12 @@
 
 #include <sys/stat.h>
 
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <filesystem>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/dns_updater.cpp b/src/dns_updater.cpp
index 5d9e417..d2c1a28 100644
--- a/src/dns_updater.cpp
+++ b/src/dns_updater.cpp
@@ -1,11 +1,12 @@
 #include "dns_updater.hpp"
 
-#include <fstream>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/bus.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <fstream>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index c5d6bdc..ef0355a 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
@@ -12,16 +12,17 @@
 #include <linux/rtnetlink.h>
 #include <net/if.h>
 
-#include <algorithm>
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <stdplus/raw.hpp>
 #include <stdplus/zstring.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
+#include <algorithm>
+#include <filesystem>
 #include <string>
 #include <unordered_map>
 #include <variant>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
@@ -77,8 +78,7 @@
                                      bool enabled) :
     EthernetInterface(bus, manager, info, makeObjPath(objRoot, *info.intf.name),
                       config, enabled)
-{
-}
+{}
 
 EthernetInterface::EthernetInterface(stdplus::PinnedRef<sdbusplus::bus_t> bus,
                                      stdplus::PinnedRef<Manager> manager,
@@ -475,9 +475,9 @@
 ServerList EthernetInterface::getNTPServerFromTimeSyncd()
 {
     ServerList servers; // Variable to capture the NTP Server IPs
-    auto method =
-        bus.get().new_method_call(TIMESYNCD_SERVICE, TIMESYNCD_SERVICE_PATH,
-                                  PROPERTY_INTERFACE, METHOD_GET);
+    auto method = bus.get().new_method_call(TIMESYNCD_SERVICE,
+                                            TIMESYNCD_SERVICE_PATH,
+                                            PROPERTY_INTERFACE, METHOD_GET);
 
     method.append(TIMESYNCD_INTERFACE, "LinkNTPServers");
 
@@ -734,8 +734,8 @@
         dhcp["SendHostname"].emplace_back(conf.sendHostNameEnabled() ? "true"
                                                                      : "false");
     }
-    auto path =
-        config::pathForIntfConf(manager.get().getConfDir(), interfaceName());
+    auto path = config::pathForIntfConf(manager.get().getConfDir(),
+                                        interfaceName());
     config.writeFile(path);
     lg2::info("Wrote networkd file: {FILE_PATH}", "FILE_PATH", path);
 }
diff --git a/src/ethernet_interface.hpp b/src/ethernet_interface.hpp
index b66030a..87cfd68 100644
--- a/src/ethernet_interface.hpp
+++ b/src/ethernet_interface.hpp
@@ -5,19 +5,20 @@
 #include "xyz/openbmc_project/Network/IP/Create/server.hpp"
 #include "xyz/openbmc_project/Network/Neighbor/CreateStatic/server.hpp"
 
-#include <optional>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <stdplus/pinned.hpp>
 #include <stdplus/zstring_view.hpp>
-#include <string>
-#include <vector>
 #include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
 #include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
 #include <xyz/openbmc_project/Network/MACAddress/server.hpp>
 #include <xyz/openbmc_project/Network/VLAN/server.hpp>
 #include <xyz/openbmc_project/Object/Delete/server.hpp>
 
+#include <optional>
+#include <string>
+#include <vector>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/ibm/hypervisor-network-mgr-src/hyp_network_manager.cpp b/src/ibm/hypervisor-network-mgr-src/hyp_network_manager.cpp
index c1e35d9..16d3d29 100644
--- a/src/ibm/hypervisor-network-mgr-src/hyp_network_manager.cpp
+++ b/src/ibm/hypervisor-network-mgr-src/hyp_network_manager.cpp
@@ -104,8 +104,8 @@
         interfaces.emplace_back(biosMgrIntf);
         auto depth = 0;
 
-        auto mapperCall =
-            bus.new_method_call(mapperBus, mapperObj, mapperIntf, "GetSubTree");
+        auto mapperCall = bus.new_method_call(mapperBus, mapperObj, mapperIntf,
+                                              "GetSubTree");
 
         mapperCall.append(biosMgrObj, depth, interfaces);
 
@@ -137,7 +137,7 @@
         {
             // If there are more than 2 objects, object path must contain the
             // interface name
-            for (auto const& object : objectTree)
+            for (const auto& object : objectTree)
             {
                 lg2::info("{INTERFACE_NAME}", "INTERFACE_NAME", biosMgrIntf);
                 lg2::info("{OBJECT}", "OBJECT", object.first);
diff --git a/src/ibm/hypervisor-network-mgr-src/hyp_sys_config.hpp b/src/ibm/hypervisor-network-mgr-src/hyp_sys_config.hpp
index 8c3e423..26f03f7 100644
--- a/src/ibm/hypervisor-network-mgr-src/hyp_sys_config.hpp
+++ b/src/ibm/hypervisor-network-mgr-src/hyp_sys_config.hpp
@@ -3,9 +3,10 @@
 
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
-#include <string>
 #include <xyz/openbmc_project/Network/SystemConfiguration/server.hpp>
 
+#include <string>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/inventory_mac.cpp b/src/inventory_mac.cpp
index dfb03e5..e4aad88 100644
--- a/src/inventory_mac.cpp
+++ b/src/inventory_mac.cpp
@@ -5,17 +5,18 @@
 #include "network_manager.hpp"
 #include "types.hpp"
 
-#include <filesystem>
-#include <fstream>
-#include <memory>
 #include <nlohmann/json.hpp>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/bus/match.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
+#include <filesystem>
+#include <fstream>
+#include <memory>
 #include <string>
 #include <vector>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor::network::inventory
 {
@@ -83,8 +84,8 @@
 
     auto depth = 0;
 
-    auto mapperCall =
-        bus.new_method_call(mapperBus, mapperObj, mapperIntf, "GetSubTree");
+    auto mapperCall = bus.new_method_call(mapperBus, mapperObj, mapperIntf,
+                                          "GetSubTree");
 
     mapperCall.append(invRoot, depth, interfaces);
 
@@ -117,7 +118,7 @@
     {
         // If there are more than 2 objects, object path must contain the
         // interface name
-        for (auto const& object : objectTree)
+        for (const auto& object : objectTree)
         {
             lg2::info("Get info on interface {INTERFACE_NAME}, object {OBJECT}",
                       "INTERFACE_NAME", interfaceName, "OBJECT", object.first);
diff --git a/src/inventory_mac.hpp b/src/inventory_mac.hpp
index 1b6aa8b..ee97df6 100644
--- a/src/inventory_mac.hpp
+++ b/src/inventory_mac.hpp
@@ -1,8 +1,9 @@
 #pragma once
-#include <memory>
 #include <sdbusplus/bus.hpp>
 #include <stdplus/pinned.hpp>
 
+#include <memory>
+
 namespace phosphor::network
 {
 
diff --git a/src/ipaddress.cpp b/src/ipaddress.cpp
index 2235550..464a2c0 100644
--- a/src/ipaddress.cpp
+++ b/src/ipaddress.cpp
@@ -6,10 +6,11 @@
 
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
 #include <stdexcept>
 #include <string>
 #include <string_view>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
@@ -30,8 +31,7 @@
 
 template <typename T>
 struct Proto
-{
-};
+{};
 
 template <>
 struct Proto<in_addr>
@@ -49,8 +49,7 @@
                      stdplus::PinnedRef<EthernetInterface> parent, IfAddr addr,
                      AddressOrigin origin) :
     IPAddress(bus, makeObjPath(objRoot, addr), parent, addr, origin)
-{
-}
+{}
 
 IPAddress::IPAddress(sdbusplus::bus_t& bus,
                      sdbusplus::message::object_path objPath,
diff --git a/src/ipaddress.hpp b/src/ipaddress.hpp
index 743025b..1785e06 100644
--- a/src/ipaddress.hpp
+++ b/src/ipaddress.hpp
@@ -5,10 +5,11 @@
 #include <sdbusplus/message/native_types.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <stdplus/pinned.hpp>
-#include <string_view>
 #include <xyz/openbmc_project/Network/IP/server.hpp>
 #include <xyz/openbmc_project/Object/Delete/server.hpp>
 
+#include <string_view>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/ncsi_netlink_main.cpp b/src/ncsi_netlink_main.cpp
index c437695..5f65777 100644
--- a/src/ncsi_netlink_main.cpp
+++ b/src/ncsi_netlink_main.cpp
@@ -17,6 +17,7 @@
 #include "ncsi_util.hpp"
 
 #include <phosphor-logging/lg2.hpp>
+
 #include <string>
 #include <vector>
 
diff --git a/src/ncsi_util.cpp b/src/ncsi_util.cpp
index 07ac7aa..70e934b 100644
--- a/src/ncsi_util.cpp
+++ b/src/ncsi_util.cpp
@@ -6,9 +6,10 @@
 #include <netlink/genl/genl.h>
 #include <netlink/netlink.h>
 
+#include <phosphor-logging/lg2.hpp>
+
 #include <iomanip>
 #include <iostream>
-#include <phosphor-logging/lg2.hpp>
 #include <vector>
 
 namespace phosphor
@@ -49,8 +50,7 @@
         std::span<const unsigned char> p = std::span<const unsigned char>()) :
         cmd(c),
         ncsi_cmd(nc), payload(p)
-    {
-    }
+    {}
 
     int cmd;
     int ncsi_cmd;
@@ -187,7 +187,6 @@
             }
             if (channeltb[NCSI_CHANNEL_ATTR_LINK_STATE])
             {
-
                 auto link =
                     nla_get_u32(channeltb[NCSI_CHANNEL_ATTR_LINK_STATE]);
                 lg2::debug("Channel Link State : {LINK_STATE}", "LINK_STATE",
@@ -237,8 +236,8 @@
     }
 
     auto data_len = nla_len(tb[NCSI_ATTR_DATA]) - sizeof(NCSIPacketHeader);
-    unsigned char* data =
-        (unsigned char*)nla_data(tb[NCSI_ATTR_DATA]) + sizeof(NCSIPacketHeader);
+    unsigned char* data = (unsigned char*)nla_data(tb[NCSI_ATTR_DATA]) +
+                          sizeof(NCSIPacketHeader);
     auto s = std::span<const unsigned char>(data, data_len);
 
     // Dump the response to stdout. Enhancement: option to save response data
diff --git a/src/neighbor.cpp b/src/neighbor.cpp
index 959f524..d9f2436 100644
--- a/src/neighbor.cpp
+++ b/src/neighbor.cpp
@@ -5,9 +5,10 @@
 
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
-#include <string>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <string>
+
 namespace phosphor
 {
 namespace network
@@ -24,8 +25,7 @@
                    stdplus::PinnedRef<EthernetInterface> parent, InAddrAny addr,
                    ether_addr lladdr, State state) :
     Neighbor(bus, makeObjPath(objRoot, addr), parent, addr, lladdr, state)
-{
-}
+{}
 
 Neighbor::Neighbor(sdbusplus::bus_t& bus,
                    sdbusplus::message::object_path objPath,
diff --git a/src/neighbor.hpp b/src/neighbor.hpp
index 861a1ec..f36371a 100644
--- a/src/neighbor.hpp
+++ b/src/neighbor.hpp
@@ -5,10 +5,11 @@
 #include <sdbusplus/message/native_types.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <stdplus/pinned.hpp>
-#include <string_view>
 #include <xyz/openbmc_project/Network/Neighbor/server.hpp>
 #include <xyz/openbmc_project/Object/Delete/server.hpp>
 
+#include <string_view>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/netlink.cpp b/src/netlink.cpp
index 1577161..69ea5c6 100644
--- a/src/netlink.cpp
+++ b/src/netlink.cpp
@@ -4,11 +4,12 @@
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 
-#include <array>
-#include <stdexcept>
 #include <stdplus/fd/create.hpp>
 #include <stdplus/fd/ops.hpp>
 #include <stdplus/raw.hpp>
+
+#include <array>
+#include <stdexcept>
 #include <system_error>
 
 using stdplus::raw::Aligned;
diff --git a/src/netlink.hpp b/src/netlink.hpp
index be44d24..b6b89d9 100644
--- a/src/netlink.hpp
+++ b/src/netlink.hpp
@@ -4,6 +4,7 @@
 
 #include <function2/function2.hpp>
 #include <stdplus/raw.hpp>
+
 #include <string_view>
 #include <tuple>
 #include <type_traits>
diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index ffcae48..72e0d03 100644
--- a/src/network_manager.cpp
+++ b/src/network_manager.cpp
@@ -10,13 +10,14 @@
 #include <linux/neighbour.h>
 #include <net/if.h>
 
-#include <filesystem>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/message.hpp>
 #include <stdplus/pinned.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <filesystem>
+
 constexpr char SYSTEMD_BUSNAME[] = "org.freedesktop.systemd1";
 constexpr char SYSTEMD_PATH[] = "/org/freedesktop/systemd1";
 constexpr char SYSTEMD_INTERFACE[] = "org.freedesktop.systemd1.Manager";
@@ -48,31 +49,31 @@
     systemdNetworkdEnabledMatch(
         bus, enabledMatch,
         [man = stdplus::PinnedRef(*this)](sdbusplus::message_t& m) {
-            std::string intf;
-            std::unordered_map<std::string, std::variant<std::string>> values;
-            try
-            {
-                m.read(intf, values);
-                auto it = values.find("AdministrativeState");
-                if (it == values.end())
-                {
-                    return;
-                }
-                const std::string_view obj = m.get_path();
-                auto sep = obj.rfind('/');
-                if (sep == obj.npos || sep + 3 > obj.size())
-                {
-                    throw std::invalid_argument("Invalid obj path");
-                }
-                auto ifidx = DecodeInt<unsigned, 10>{}(obj.substr(sep + 3));
-                const auto& state = std::get<std::string>(it->second);
-                man.get().handleAdminState(state, ifidx);
-            }
-            catch (const std::exception& e)
-            {
-                lg2::error("AdministrativeState match parsing failed: {ERROR}",
-                           "ERROR", e);
-            }
+    std::string intf;
+    std::unordered_map<std::string, std::variant<std::string>> values;
+    try
+    {
+        m.read(intf, values);
+        auto it = values.find("AdministrativeState");
+        if (it == values.end())
+        {
+            return;
+        }
+        const std::string_view obj = m.get_path();
+        auto sep = obj.rfind('/');
+        if (sep == obj.npos || sep + 3 > obj.size())
+        {
+            throw std::invalid_argument("Invalid obj path");
+        }
+        auto ifidx = DecodeInt<unsigned, 10>{}(obj.substr(sep + 3));
+        const auto& state = std::get<std::string>(it->second);
+        man.get().handleAdminState(state, ifidx);
+    }
+    catch (const std::exception& e)
+    {
+        lg2::error("AdministrativeState match parsing failed: {ERROR}", "ERROR",
+                   e);
+    }
         })
 {
     reload.setCallback([&]() {
@@ -360,38 +361,38 @@
     {
         std::visit(
             [&](auto addr) {
-                if constexpr (std::is_same_v<in_addr, decltype(addr)>)
-                {
-                    it->second.defgw4.emplace(addr);
-                }
-                else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
-                {
-                    it->second.defgw6.emplace(addr);
-                }
-                else
-                {
-                    static_assert(!std::is_same_v<void, decltype(addr)>);
-                }
+            if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+            {
+                it->second.defgw4.emplace(addr);
+            }
+            else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+            {
+                it->second.defgw6.emplace(addr);
+            }
+            else
+            {
+                static_assert(!std::is_same_v<void, decltype(addr)>);
+            }
             },
             addr);
         if (auto it = interfacesByIdx.find(ifidx); it != interfacesByIdx.end())
         {
             std::visit(
                 [&](auto addr) {
-                    if constexpr (std::is_same_v<in_addr, decltype(addr)>)
-                    {
-                        it->second->EthernetInterfaceIntf::defaultGateway(
-                            std::to_string(addr));
-                    }
-                    else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
-                    {
-                        it->second->EthernetInterfaceIntf::defaultGateway6(
-                            std::to_string(addr));
-                    }
-                    else
-                    {
-                        static_assert(!std::is_same_v<void, decltype(addr)>);
-                    }
+                if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+                {
+                    it->second->EthernetInterfaceIntf::defaultGateway(
+                        std::to_string(addr));
+                }
+                else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+                {
+                    it->second->EthernetInterfaceIntf::defaultGateway6(
+                        std::to_string(addr));
+                }
+                else
+                {
+                    static_assert(!std::is_same_v<void, decltype(addr)>);
+                }
                 },
                 addr);
         }
@@ -408,52 +409,48 @@
     {
         std::visit(
             [&](auto addr) {
-                if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+            if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+            {
+                if (it->second.defgw4 == addr)
                 {
-                    if (it->second.defgw4 == addr)
-                    {
-                        it->second.defgw4.reset();
-                    }
+                    it->second.defgw4.reset();
                 }
-                else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+            }
+            else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+            {
+                if (it->second.defgw6 == addr)
                 {
-                    if (it->second.defgw6 == addr)
-                    {
-                        it->second.defgw6.reset();
-                    }
+                    it->second.defgw6.reset();
                 }
-                else
-                {
-                    static_assert(!std::is_same_v<void, decltype(addr)>);
-                }
+            }
+            else
+            {
+                static_assert(!std::is_same_v<void, decltype(addr)>);
+            }
             },
             addr);
         if (auto it = interfacesByIdx.find(ifidx); it != interfacesByIdx.end())
         {
             std::visit(
                 [&](auto addr) {
-                    if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+                if constexpr (std::is_same_v<in_addr, decltype(addr)>)
+                {
+                    if (it->second->defaultGateway() == std::to_string(addr))
                     {
-                        if (it->second->defaultGateway() ==
-                            std::to_string(addr))
-                        {
-                            it->second->EthernetInterfaceIntf::defaultGateway(
-                                "");
-                        }
+                        it->second->EthernetInterfaceIntf::defaultGateway("");
                     }
-                    else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+                }
+                else if constexpr (std::is_same_v<in6_addr, decltype(addr)>)
+                {
+                    if (it->second->defaultGateway6() == std::to_string(addr))
                     {
-                        if (it->second->defaultGateway6() ==
-                            std::to_string(addr))
-                        {
-                            it->second->EthernetInterfaceIntf::defaultGateway6(
-                                "");
-                        }
+                        it->second->EthernetInterfaceIntf::defaultGateway6("");
                     }
-                    else
-                    {
-                        static_assert(!std::is_same_v<void, decltype(addr)>);
-                    }
+                }
+                else
+                {
+                    static_assert(!std::is_same_v<void, decltype(addr)>);
+                }
                 },
                 addr);
         }
diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index 490c4bc..2643d52 100644
--- a/src/network_manager.hpp
+++ b/src/network_manager.hpp
@@ -5,18 +5,19 @@
 #include "types.hpp"
 #include "xyz/openbmc_project/Network/VLAN/Create/server.hpp"
 
-#include <filesystem>
 #include <function2/function2.hpp>
-#include <memory>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/bus/match.hpp>
 #include <sdbusplus/message/native_types.hpp>
 #include <stdplus/pinned.hpp>
 #include <stdplus/zstring_view.hpp>
+#include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
+
+#include <filesystem>
+#include <memory>
 #include <string>
 #include <string_view>
 #include <vector>
-#include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
 
 namespace phosphor
 {
diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp
index 3669429..ca971f3 100644
--- a/src/network_manager_main.cpp
+++ b/src/network_manager_main.cpp
@@ -9,7 +9,6 @@
 
 #include <fmt/format.h>
 
-#include <chrono>
 #include <phosphor-logging/lg2.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/manager.hpp>
@@ -21,6 +20,8 @@
 #include <stdplus/pinned.hpp>
 #include <stdplus/signal.hpp>
 
+#include <chrono>
+
 constexpr char DEFAULT_OBJPATH[] = "/xyz/openbmc_project/network";
 
 namespace phosphor::network
@@ -34,8 +35,7 @@
   public:
     TimerExecutor(sdeventplus::Event& event, std::chrono::seconds delay) :
         delay(delay), timer(event, nullptr)
-    {
-    }
+    {}
 
     void schedule() override
     {
diff --git a/src/rtnetlink_server.hpp b/src/rtnetlink_server.hpp
index 49e32ea..7e06494 100644
--- a/src/rtnetlink_server.hpp
+++ b/src/rtnetlink_server.hpp
@@ -20,7 +20,6 @@
  */
 class Server
 {
-
   public:
     /** @brief Constructor
      *
diff --git a/src/system_configuration.cpp b/src/system_configuration.cpp
index f817dfe..7604eb9 100644
--- a/src/system_configuration.cpp
+++ b/src/system_configuration.cpp
@@ -25,35 +25,33 @@
 SystemConfiguration::SystemConfiguration(
     stdplus::PinnedRef<sdbusplus::bus_t> bus, stdplus::const_zstring objPath) :
     Iface(bus, objPath.c_str(), Iface::action::defer_emit),
-    bus(bus),
-    hostnamePropMatch(
-        bus, propMatch,
-        [sc = stdplus::PinnedRef(*this)](sdbusplus::message_t& m) {
-            std::string intf;
-            std::unordered_map<std::string, std::variant<std::string>> values;
-            try
-            {
-                m.read(intf, values);
-                auto it = values.find("Hostname");
-                if (it == values.end())
-                {
-                    return;
-                }
-                sc.get().Iface::hostName(std::get<std::string>(it->second));
-            }
-            catch (const std::exception& e)
-            {
-                lg2::error("Hostname match parsing failed: {ERROR}", "ERROR",
-                           e);
-            }
-        })
+    bus(bus), hostnamePropMatch(
+                  bus, propMatch,
+                  [sc = stdplus::PinnedRef(*this)](sdbusplus::message_t& m) {
+    std::string intf;
+    std::unordered_map<std::string, std::variant<std::string>> values;
+    try
+    {
+        m.read(intf, values);
+        auto it = values.find("Hostname");
+        if (it == values.end())
+        {
+            return;
+        }
+        sc.get().Iface::hostName(std::get<std::string>(it->second));
+    }
+    catch (const std::exception& e)
+    {
+        lg2::error("Hostname match parsing failed: {ERROR}", "ERROR", e);
+    }
+                  })
 {
     try
     {
         std::variant<std::string> name;
-        auto req =
-            bus.get().new_method_call(HOSTNAMED_SVC, HOSTNAMED_OBJ,
-                                      "org.freedesktop.DBus.Properties", "Get");
+        auto req = bus.get().new_method_call(HOSTNAMED_SVC, HOSTNAMED_OBJ,
+                                             "org.freedesktop.DBus.Properties",
+                                             "Get");
 
         req.append(HOSTNAMED_INTF, "Hostname");
         auto reply = req.call();
diff --git a/src/system_configuration.hpp b/src/system_configuration.hpp
index 4eceec0..8f79bac 100644
--- a/src/system_configuration.hpp
+++ b/src/system_configuration.hpp
@@ -5,9 +5,10 @@
 #include <sdbusplus/server/object.hpp>
 #include <stdplus/pinned.hpp>
 #include <stdplus/zstring.hpp>
-#include <string>
 #include <xyz/openbmc_project/Network/SystemConfiguration/server.hpp>
 
+#include <string>
+
 namespace phosphor
 {
 namespace network
diff --git a/src/system_queries.cpp b/src/system_queries.cpp
index 6c59547..56feb8d 100644
--- a/src/system_queries.cpp
+++ b/src/system_queries.cpp
@@ -8,12 +8,13 @@
 #include <linux/sockios.h>
 #include <net/if.h>
 
-#include <algorithm>
-#include <optional>
 #include <phosphor-logging/lg2.hpp>
-#include <stdexcept>
 #include <stdplus/fd/create.hpp>
 #include <stdplus/util/cexec.hpp>
+
+#include <algorithm>
+#include <optional>
+#include <stdexcept>
 #include <string_view>
 
 namespace phosphor::network::system
@@ -24,8 +25,8 @@
 static stdplus::Fd& getIFSock()
 {
     using namespace stdplus::fd;
-    static auto fd =
-        socket(SocketDomain::INet, SocketType::Datagram, SocketProto::IP);
+    static auto fd = socket(SocketDomain::INet, SocketType::Datagram,
+                            SocketProto::IP);
     return fd;
 }
 
@@ -85,8 +86,7 @@
     return optionalIFReq(
                ifname, SIOCETHTOOL, "ETHTOOL"sv,
                [&](const ifreq&) {
-                   return EthInfo{.autoneg = edata.autoneg != 0,
-                                  .speed = edata.speed};
+        return EthInfo{.autoneg = edata.autoneg != 0, .speed = edata.speed};
                },
                &edata)
         .value_or(EthInfo{});
@@ -116,17 +116,16 @@
     ifinfomsg msg = {};
     msg.ifi_family = AF_UNSPEC;
     msg.ifi_index = idx;
-    netlink::performRequest(
-        NETLINK_ROUTE, RTM_DELLINK, NLM_F_REPLACE, msg,
-        [&](const nlmsghdr& hdr, std::string_view data) {
-            int err = 0;
-            if (hdr.nlmsg_type == NLMSG_ERROR)
-            {
-                err = netlink::extractRtData<nlmsgerr>(data).error;
-            }
-            throw std::runtime_error(
-                fmt::format("Failed to delete `{}`: {}", idx, strerror(err)));
-        });
+    netlink::performRequest(NETLINK_ROUTE, RTM_DELLINK, NLM_F_REPLACE, msg,
+                            [&](const nlmsghdr& hdr, std::string_view data) {
+        int err = 0;
+        if (hdr.nlmsg_type == NLMSG_ERROR)
+        {
+            err = netlink::extractRtData<nlmsgerr>(data).error;
+        }
+        throw std::runtime_error(
+            fmt::format("Failed to delete `{}`: {}", idx, strerror(err)));
+    });
 }
 
 } // namespace phosphor::network::system
diff --git a/src/system_queries.hpp b/src/system_queries.hpp
index 9027cb3..5b54985 100644
--- a/src/system_queries.hpp
+++ b/src/system_queries.hpp
@@ -1,8 +1,9 @@
 #pragma once
 #include "types.hpp"
 
-#include <cstdint>
 #include <stdplus/zstring_view.hpp>
+
+#include <cstdint>
 #include <string_view>
 
 namespace phosphor::network::system
diff --git a/src/types.hpp b/src/types.hpp
index 8d1daf4..ba4ee1a 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -46,18 +46,16 @@
     static void invalidPfx(uint8_t pfx);
 
   public:
-    constexpr IfAddr() : addr({}), pfx(0)
-    {
-    }
+    constexpr IfAddr() : addr({}), pfx(0) {}
 
     constexpr IfAddr(InAddrAny addr, uint8_t pfx) : addr(addr), pfx(pfx)
     {
         std::visit(
             [pfx](auto v) {
-                if (sizeof(v) * 8 < pfx)
-                {
-                    invalidPfx(pfx);
-                }
+            if (sizeof(v) * 8 < pfx)
+            {
+                invalidPfx(pfx);
+            }
             },
             addr);
     }
@@ -285,38 +283,38 @@
             throw std::invalid_argument("Empty Str");
         }
         constexpr auto max = std::numeric_limits<T>::max();
-        auto ret =
-            std::accumulate(str.begin(), str.end(), T{}, [&](T r, char c) {
-                auto v = detail::charLookup[c];
-                if (v < 0 || v >= base)
+        auto ret = std::accumulate(str.begin(), str.end(), T{},
+                                   [&](T r, char c) {
+            auto v = detail::charLookup[c];
+            if (v < 0 || v >= base)
+            {
+                throw std::invalid_argument("Invalid numeral");
+            }
+            if constexpr (std::popcount(base) == 1)
+            {
+                constexpr auto shift = std::countr_zero(base);
+                constexpr auto maxshift = max >> shift;
+                if (r > maxshift)
                 {
-                    throw std::invalid_argument("Invalid numeral");
+                    throw std::overflow_error("Integer Decode");
                 }
-                if constexpr (std::popcount(base) == 1)
+                return (r << shift) | v;
+            }
+            else
+            {
+                constexpr auto maxbase = max / base;
+                if (r > maxbase)
                 {
-                    constexpr auto shift = std::countr_zero(base);
-                    constexpr auto maxshift = max >> shift;
-                    if (r > maxshift)
-                    {
-                        throw std::overflow_error("Integer Decode");
-                    }
-                    return (r << shift) | v;
+                    throw std::overflow_error("Integer Decode");
                 }
-                else
+                r *= base;
+                if (max - v < r)
                 {
-                    constexpr auto maxbase = max / base;
-                    if (r > maxbase)
-                    {
-                        throw std::overflow_error("Integer Decode");
-                    }
-                    r *= base;
-                    if (max - v < r)
-                    {
-                        throw std::overflow_error("Integer Decode");
-                    }
-                    return r + v;
+                    throw std::overflow_error("Integer Decode");
                 }
-            });
+                return r + v;
+            }
+        });
         return ret;
     }
 };
@@ -376,8 +374,7 @@
 
 template <typename T>
 struct ToAddr
-{
-};
+{};
 
 template <>
 struct ToAddr<ether_addr>
@@ -524,8 +521,7 @@
 
 template <typename T>
 struct ToStr
-{
-};
+{};
 
 template <>
 struct ToStr<char>
@@ -698,14 +694,14 @@
 {
     return std::visit(
         [t](auto v) {
-            if constexpr (std::is_same_v<T, decltype(v)>)
-            {
-                return v == t;
-            }
-            else
-            {
-                return false;
-            }
+        if constexpr (std::is_same_v<T, decltype(v)>)
+        {
+            return v == t;
+        }
+        else
+        {
+            return false;
+        }
         },
         v);
 }
@@ -777,26 +773,21 @@
 {
 template <>
 struct formatter<ether_addr> : phosphor::network::detail::Format<ether_addr>
-{
-};
+{};
 template <>
 struct formatter<in_addr> : phosphor::network::detail::Format<in_addr>
-{
-};
+{};
 template <>
 struct formatter<in6_addr> : phosphor::network::detail::Format<in6_addr>
-{
-};
+{};
 template <>
-struct formatter<phosphor::network::InAddrAny>
-    : phosphor::network::detail::Format<phosphor::network::InAddrAny>
-{
-};
+struct formatter<phosphor::network::InAddrAny> :
+    phosphor::network::detail::Format<phosphor::network::InAddrAny>
+{};
 template <>
-struct formatter<phosphor::network::IfAddr>
-    : phosphor::network::detail::Format<phosphor::network::IfAddr>
-{
-};
+struct formatter<phosphor::network::IfAddr> :
+    phosphor::network::detail::Format<phosphor::network::IfAddr>
+{};
 } // namespace fmt
 
 namespace std
diff --git a/src/util.cpp b/src/util.cpp
index 0b9c1e2..87fe235 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -9,12 +9,13 @@
 #include <fmt/format.h>
 #include <sys/wait.h>
 
-#include <cctype>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/lg2.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
+#include <cctype>
 #include <string>
 #include <string_view>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
@@ -168,8 +169,7 @@
                              auto&& fun)
 {
     if (!config.getFileExists())
-    {
-    }
+    {}
     else if (auto str = config.map.getLastValueString(section, key);
              str == nullptr)
     {
diff --git a/src/util.hpp b/src/util.hpp
index 90beca2..f35e512 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -1,9 +1,10 @@
 #pragma once
 #include "types.hpp"
 
-#include <optional>
 #include <stdplus/raw.hpp>
 #include <stdplus/zstring.hpp>
+
+#include <optional>
 #include <string>
 #include <string_view>
 #include <unordered_set>