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: I016cb74930cc475843c30bd604e739058effa504
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tests/src/dbus_environment.hpp b/tests/src/dbus_environment.hpp
index 1006323..f3f7723 100644
--- a/tests/src/dbus_environment.hpp
+++ b/tests/src/dbus_environment.hpp
@@ -110,7 +110,7 @@
                 return;
             }
             propertyPromise.set_value(t);
-            });
+        });
         return DbusEnvironment::waitForFuture(std::move(propertyFuture));
     }
 
@@ -127,7 +127,7 @@
             [promise = std::move(promise)](
                 boost::system::error_code ec) mutable {
             promise.set_value(ec);
-            });
+        });
         return DbusEnvironment::waitForFuture(std::move(future));
     }
 
@@ -142,7 +142,7 @@
             [promise = std::move(promise)](
                 boost::system::error_code ec) mutable {
             promise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, interface, method,
             std::forward<Args>(args)...);
         return DbusEnvironment::waitForFuture(std::move(future));
diff --git a/tests/src/mocks/report_factory_mock.hpp b/tests/src/mocks/report_factory_mock.hpp
index deed82d..7cf4489 100644
--- a/tests/src/mocks/report_factory_mock.hpp
+++ b/tests/src/mocks/report_factory_mock.hpp
@@ -14,12 +14,11 @@
     {
         return utils::transform(readingParams, [](const auto& params) {
             return LabeledMetricParameters(
-                utils::transform(
-                    std::get<0>(params),
-                    [](const auto& sensorData) {
+                utils::transform(std::get<0>(params),
+                                 [](const auto& sensorData) {
                 return LabeledSensorInfo("Service", std::get<0>(sensorData),
                                          std::get<1>(sensorData));
-                    }),
+            }),
                 utils::toOperationType(std::get<1>(params)),
                 utils::toCollectionTimeScope(std::get<2>(params)),
                 CollectionDuration(Milliseconds(std::get<3>(params))));
@@ -42,8 +41,8 @@
         ON_CALL(*this,
                 make(A<const std::string&>(), _, _, _, _, _, _, _, _, _, _, _))
             .WillByDefault(WithArgs<0>(Invoke([](const std::string& id) {
-                return std::make_unique<NiceMock<ReportMock>>(id);
-            })));
+            return std::make_unique<NiceMock<ReportMock>>(id);
+        })));
     }
 
     MOCK_METHOD(std::vector<LabeledMetricParameters>, convertMetricParams,
diff --git a/tests/src/mocks/trigger_factory_mock.hpp b/tests/src/mocks/trigger_factory_mock.hpp
index f1dfa1f..a733ca4 100644
--- a/tests/src/mocks/trigger_factory_mock.hpp
+++ b/tests/src/mocks/trigger_factory_mock.hpp
@@ -18,8 +18,8 @@
 
         ON_CALL(*this, make(A<const std::string&>(), _, _, _, _, _, _, _))
             .WillByDefault(WithArgs<0>(Invoke([](const std::string& id) {
-                return std::make_unique<NiceMock<TriggerMock>>(id);
-            })));
+            return std::make_unique<NiceMock<TriggerMock>>(id);
+        })));
     }
 
     MOCK_METHOD(std::unique_ptr<interfaces::Trigger>, make,
@@ -73,11 +73,10 @@
 
             return EXPECT_CALL(
                 *this, make(params.id(), params.name(),
-                            utils::transform(
-                                params.triggerActions(),
-                                [](const auto& action) {
+                            utils::transform(params.triggerActions(),
+                                             [](const auto& action) {
                 return actionToString(action);
-                                }),
+            }),
                             params.reportIds(), tm, triggerStorage,
                             params.thresholdParams(), params.sensors()));
         }
diff --git a/tests/src/test_discrete_threshold.cpp b/tests/src/test_discrete_threshold.cpp
index 8b9168b..43a36c0 100644
--- a/tests/src/test_discrete_threshold.cpp
+++ b/tests/src/test_discrete_threshold.cpp
@@ -61,8 +61,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
@@ -232,9 +232,8 @@
                                TriggerValue(GetParam().thresholdValue)))
                 .WillOnce(DoAll(
                     InvokeWithoutArgs([idx = index, &timestamps] {
-                        timestamps[idx] =
-                            std::chrono::high_resolution_clock::now();
-                    }),
+                timestamps[idx] = std::chrono::high_resolution_clock::now();
+            }),
                     InvokeWithoutArgs(DbusEnvironment::setPromise("commit"))));
         }
 
diff --git a/tests/src/test_metric.cpp b/tests/src/test_metric.cpp
index 6410337..f042c9e 100644
--- a/tests/src/test_metric.cpp
+++ b/tests/src/test_metric.cpp
@@ -66,8 +66,8 @@
 
     EXPECT_CALL(*sensorMocks.front(),
                 registerForUpdates(Truly([sut = sut.get()](const auto& a0) {
-                    return a0.lock().get() == sut;
-                })));
+        return a0.lock().get() == sut;
+    })));
 
     sut->initialize();
 }
@@ -78,8 +78,8 @@
 
     EXPECT_CALL(*sensorMocks.front(),
                 unregisterFromUpdates(Truly([sut = sut.get()](const auto& a0) {
-                    return a0.lock().get() == sut;
-                })));
+        return a0.lock().get() == sut;
+    })));
 
     sut->deinitialize();
 }
diff --git a/tests/src/test_numeric_threshold.cpp b/tests/src/test_numeric_threshold.cpp
index 902e72f..a71f003 100644
--- a/tests/src/test_numeric_threshold.cpp
+++ b/tests/src/test_numeric_threshold.cpp
@@ -60,8 +60,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
@@ -207,9 +207,8 @@
                                _, TriggerValue(value)))
                 .WillOnce(DoAll(
                     InvokeWithoutArgs([idx = index, &timestamps] {
-                        timestamps[idx] =
-                            std::chrono::high_resolution_clock::now();
-                    }),
+                timestamps[idx] = std::chrono::high_resolution_clock::now();
+            }),
                     InvokeWithoutArgs(DbusEnvironment::setPromise("commit"))));
         }
 
diff --git a/tests/src/test_on_change_threshold.cpp b/tests/src/test_on_change_threshold.cpp
index b4a6fd3..0623a10 100644
--- a/tests/src/test_on_change_threshold.cpp
+++ b/tests/src/test_on_change_threshold.cpp
@@ -51,8 +51,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
diff --git a/tests/src/test_report.cpp b/tests/src/test_report.cpp
index accd112..31d49c5 100644
--- a/tests/src/test_report.cpp
+++ b/tests/src/test_report.cpp
@@ -199,7 +199,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, interface, method);
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
     }
@@ -237,8 +237,8 @@
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(utils::transform(defaultParams().reportActions(), [](const auto v) {
-            return utils::enumToString(v);
-        })));
+        return utils::enumToString(v);
+    })));
     EXPECT_THAT(getProperty<bool>(sut->getPath(), "EmitsReadingsUpdate"),
                 Eq(utils::contains(defaultParams().reportActions(),
                                    ReportAction::emitsReadingsUpdate)));
@@ -357,8 +357,8 @@
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(utils::transform(defaultParams().reportActions(), [](const auto v) {
-            return utils::enumToString(v);
-        })));
+        return utils::enumToString(v);
+    })));
 }
 
 TEST_F(TestReport, createReportWithEmptyActions)
@@ -385,8 +385,8 @@
         ReportParams()
             .reportId("TestId_1")
             .reportActions(utils::transform(newActions, [](const auto& action) {
-                return utils::toReportAction(action);
-            })));
+        return utils::toReportAction(action);
+    })));
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(expectedActions));
@@ -618,7 +618,7 @@
                                             defaultParams().reportActions(),
                                             [](const auto v) {
     return utils::toUnderlying(v);
-                                            }))),
+}))),
         std::make_pair("Interval",
                        nlohmann::json(defaultParams().interval().count())),
         std::make_pair("AppendLimit",
@@ -1116,8 +1116,8 @@
     {
         EXPECT_CALL(*metric, registerForUpdates(_))
             .WillOnce(Invoke([&args](const interfaces::MetricListener& report) {
-                args.emplace_back(&report);
-            }));
+            args.emplace_back(&report);
+        }));
         ;
     }
 
diff --git a/tests/src/test_report_manager.cpp b/tests/src/test_report_manager.cpp
index 295d966..83c0a1a 100644
--- a/tests/src/test_report_manager.cpp
+++ b/tests/src/test_report_manager.cpp
@@ -66,7 +66,7 @@
             [&addReportPromise](boost::system::error_code ec,
                                 const std::string& path) {
             addReportPromise.set_value({ec, path});
-            },
+        },
             DbusEnvironment::serviceName(), ReportManager::reportManagerPath,
             ReportManager::reportManagerIfaceName, "AddReport",
             std::forward<Args>(args)...);
diff --git a/tests/src/test_trigger.cpp b/tests/src/test_trigger.cpp
index 6cccb4a..3e5818a 100644
--- a/tests/src/test_trigger.cpp
+++ b/tests/src/test_trigger.cpp
@@ -141,7 +141,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, Trigger::deleteIfaceName,
             "Delete");
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
@@ -155,10 +155,9 @@
     EXPECT_THAT(getProperty<bool>(sut->getPath(), "Persistent"), Eq(true));
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "TriggerActions"),
-        Eq(utils::transform(triggerParams.triggerActions(),
-                            [](const auto& action) {
-        return actionToString(action);
-        })));
+        Eq(utils::transform(
+            triggerParams.triggerActions(),
+            [](const auto& action) { return actionToString(action); })));
     EXPECT_THAT((getProperty<SensorsInfo>(sut->getPath(), "Sensors")),
                 Eq(utils::fromLabeledSensorsInfo(triggerParams.sensors())));
     EXPECT_THAT(
@@ -519,7 +518,7 @@
                 Eq(utils::transform(triggerParams.triggerActions(),
                                     [](const auto& action) {
         return actionToString(action);
-                })));
+    })));
 }
 
 TEST_F(TestTriggerStore, settingPersistencyToTrueStoresTriggerReportIds)
diff --git a/tests/src/test_trigger_manager.cpp b/tests/src/test_trigger_manager.cpp
index 03ec5ce..945c411 100644
--- a/tests/src/test_trigger_manager.cpp
+++ b/tests/src/test_trigger_manager.cpp
@@ -31,7 +31,7 @@
             [&addTriggerPromise](boost::system::error_code ec,
                                  const std::string& path) {
             addTriggerPromise.set_value({ec, path});
-            },
+        },
             DbusEnvironment::serviceName(), TriggerManager::triggerManagerPath,
             TriggerManager::triggerManagerIfaceName, "AddTrigger", params.id(),
             params.name(),
@@ -465,10 +465,10 @@
         {"Name", TriggerParams().name()},
         {"ThresholdParamsDiscriminator",
          TriggerParams().thresholdParams().index()},
-        {"TriggerActions",
-         utils::transform(
-             TriggerParams().triggerActions(),
-             [](const auto& action) { return actionToString(action); })},
+        {"TriggerActions", utils::transform(TriggerParams().triggerActions(),
+                                            [](const auto& action) {
+        return actionToString(action);
+    })},
         {"ThresholdParams", utils::labeledThresholdParamsToJson(
                                 TriggerParams().thresholdParams())},
         {"ReportIds", TriggerParams().reportIds()},