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: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/monitor/conditions.cpp b/monitor/conditions.cpp
index 62e272c..35fb7a3 100644
--- a/monitor/conditions.cpp
+++ b/monitor/conditions.cpp
@@ -23,13 +23,13 @@
 Condition propertiesMatch(std::vector<PropertyState>&& propStates)
 {
     return [pStates = std::move(propStates)](sdbusplus::bus_t& bus) {
-        return std::all_of(
-            pStates.begin(), pStates.end(), [&bus](const auto& p) {
-                return util::SDBusPlus::getPropertyVariant<PropertyValue>(
-                           bus, std::get<propObj>(p.first),
-                           std::get<propIface>(p.first),
-                           std::get<propName>(p.first)) == p.second;
-            });
+        return std::all_of(pStates.begin(), pStates.end(),
+                           [&bus](const auto& p) {
+            return util::SDBusPlus::getPropertyVariant<PropertyValue>(
+                       bus, std::get<propObj>(p.first),
+                       std::get<propIface>(p.first),
+                       std::get<propName>(p.first)) == p.second;
+        });
     };
 }
 
diff --git a/monitor/fan_error.cpp b/monitor/fan_error.cpp
index f6aa0e6..f0a6f32 100644
--- a/monitor/fan_error.cpp
+++ b/monitor/fan_error.cpp
@@ -56,8 +56,7 @@
     JournalCloser& operator=(const JournalCloser&) = delete;
     JournalCloser& operator=(JournalCloser&&) = delete;
 
-    explicit JournalCloser(sd_journal* journal) : journal{journal}
-    {}
+    explicit JournalCloser(sd_journal* journal) : journal{journal} {}
 
     ~JournalCloser()
     {
diff --git a/monitor/json_parser.cpp b/monitor/json_parser.cpp
index e3d23d9..6714984 100644
--- a/monitor/json_parser.cpp
+++ b/monitor/json_parser.cpp
@@ -473,8 +473,8 @@
     }
     else
     {
-        auto msg =
-            fmt::format("Invalid 'type' entry {} in power off config", type);
+        auto msg = fmt::format("Invalid 'type' entry {} in power off config",
+                               type);
         log<level::ERR>(msg.c_str());
         throw std::runtime_error(msg.c_str());
     }
diff --git a/monitor/power_off_cause.hpp b/monitor/power_off_cause.hpp
index f40e1fe..63b0cfd 100644
--- a/monitor/power_off_cause.hpp
+++ b/monitor/power_off_cause.hpp
@@ -109,10 +109,10 @@
      */
     bool satisfied(const FanHealth& fanHealth) override
     {
-        size_t count = std::count_if(
-            fanHealth.begin(), fanHealth.end(), [](const auto& fan) {
-                return !std::get<presentHealthPos>(fan.second);
-            });
+        size_t count = std::count_if(fanHealth.begin(), fanHealth.end(),
+                                     [](const auto& fan) {
+            return !std::get<presentHealthPos>(fan.second);
+        });
 
         return count >= _count;
     }
@@ -152,15 +152,13 @@
      */
     bool satisfied(const FanHealth& fanHealth) override
     {
-        size_t count = std::accumulate(
-            fanHealth.begin(), fanHealth.end(), 0,
-            [](int sum, const auto& fan) {
-                const auto& tachs = std::get<sensorFuncHealthPos>(fan.second);
-                auto nonFuncTachs =
-                    std::count_if(tachs.begin(), tachs.end(),
-                                  [](bool tach) { return !tach; });
-                return sum + nonFuncTachs;
-            });
+        size_t count = std::accumulate(fanHealth.begin(), fanHealth.end(), 0,
+                                       [](int sum, const auto& fan) {
+            const auto& tachs = std::get<sensorFuncHealthPos>(fan.second);
+            auto nonFuncTachs = std::count_if(tachs.begin(), tachs.end(),
+                                              [](bool tach) { return !tach; });
+            return sum + nonFuncTachs;
+        });
 
         return count >= _count;
     }
diff --git a/monitor/system.cpp b/monitor/system.cpp
index 40cca00..0fc2c44 100644
--- a/monitor/system.cpp
+++ b/monitor/system.cpp
@@ -120,8 +120,8 @@
         // off here.
         std::for_each(_powerOffRules.begin(), _powerOffRules.end(),
                       [this](auto& rule) {
-                          rule->check(PowerRuleState::runtime, _fanHealth);
-                      });
+            rule->check(PowerRuleState::runtime, _fanHealth);
+        });
     }
 
     subscribeSensorsToServices();
@@ -292,7 +292,7 @@
 // to new state
 //
 void System::tachSignalOffline(sdbusplus::message_t& msg,
-                               SensorMapType const& sensorMap)
+                               const SensorMapType& sensorMap)
 {
     std::string serviceName, oldOwner, newOwner;
 
@@ -329,8 +329,8 @@
         sensorStatus.push_back(sensor->functional());
     }
 
-    _fanHealth[fan.getName()] =
-        std::make_tuple(fan.present(), std::move(sensorStatus));
+    _fanHealth[fan.getName()] = std::make_tuple(fan.present(),
+                                                std::move(sensorStatus));
 }
 
 void System::fanStatusChange(const Fan& fan, bool skipRulesCheck)
@@ -341,8 +341,8 @@
     {
         std::for_each(_powerOffRules.begin(), _powerOffRules.end(),
                       [this](auto& rule) {
-                          rule->check(PowerRuleState::runtime, _fanHealth);
-                      });
+            rule->check(PowerRuleState::runtime, _fanHealth);
+        });
     }
 }
 
@@ -385,8 +385,8 @@
             sleep(DELAY_HOST_CONTROL);
             std::for_each(_fans.begin(), _fans.end(),
                           [powerStateOn](auto& fan) {
-                              fan->powerStateChanged(powerStateOn);
-                          });
+                fan->powerStateChanged(powerStateOn);
+            });
             if (std::all_of(_fans.begin(), _fans.end(), [](const auto& fan) {
                     return fan->numSensorsOnDBusAtPowerOn() == 0;
                 }))
@@ -407,12 +407,12 @@
 
         std::for_each(_powerOffRules.begin(), _powerOffRules.end(),
                       [this](auto& rule) {
-                          rule->check(PowerRuleState::atPgood, _fanHealth);
-                      });
+            rule->check(PowerRuleState::atPgood, _fanHealth);
+        });
         std::for_each(_powerOffRules.begin(), _powerOffRules.end(),
                       [this](auto& rule) {
-                          rule->check(PowerRuleState::runtime, _fanHealth);
-                      });
+            rule->check(PowerRuleState::runtime, _fanHealth);
+        });
     }
     else
     {
diff --git a/monitor/tach_sensor.cpp b/monitor/tach_sensor.cpp
index f5a7238..9e05009 100644
--- a/monitor/tach_sensor.cpp
+++ b/monitor/tach_sensor.cpp
@@ -61,8 +61,8 @@
 {
     try
     {
-        value =
-            util::SDBusPlus::getProperty<T>(bus, path, interface, propertyName);
+        value = util::SDBusPlus::getProperty<T>(bus, path, interface,
+                                                propertyName);
     }
     catch (const std::exception& e)
     {
diff --git a/monitor/trust_group.hpp b/monitor/trust_group.hpp
index 53ed610..e2cb269 100644
--- a/monitor/trust_group.hpp
+++ b/monitor/trust_group.hpp
@@ -55,8 +55,7 @@
      *
      * @param[in] names - the names and inclusion of sensors in the group
      */
-    explicit Group(const std::vector<GroupDefinition>& names) : _names(names)
-    {}
+    explicit Group(const std::vector<GroupDefinition>& names) : _names(names) {}
 
     /**
      * Used to register a TachSensor object with the group.
@@ -67,11 +66,11 @@
      */
     void registerSensor(std::shared_ptr<monitor::TachSensor>& sensor)
     {
-        auto found = std::find_if(
-            _names.begin(), _names.end(), [&sensor](const auto& name) {
-                return monitor::FAN_SENSOR_PATH + std::get<sensorName>(name) ==
-                       sensor->name();
-            });
+        auto found = std::find_if(_names.begin(), _names.end(),
+                                  [&sensor](const auto& name) {
+            return monitor::FAN_SENSOR_PATH + std::get<sensorName>(name) ==
+                   sensor->name();
+        });
 
         if (found != _names.end())
         {
@@ -91,8 +90,8 @@
     {
         return (std::find_if(_sensors.begin(), _sensors.end(),
                              [&sensor](const auto& s) {
-                                 return sensor.name() == s.sensor->name();
-                             }) != _sensors.end());
+            return sensor.name() == s.sensor->name();
+                }) != _sensors.end());
     }
 
     /**