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/.clang-format b/.clang-format
index d92a3f1..d43e884 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,26 +14,30 @@
 AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: Empty
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: true
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
 AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
+BitFieldColonSpacing: None
 BraceWrapping:
   AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
+  AfterExternBlock: true
   AfterFunction:   true
   AfterNamespace:  true
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
-  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
+  BeforeLambdaBody: false
+  BeforeWhile:     false
   IndentBraces:    false
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
@@ -48,17 +52,16 @@
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DeriveLineEnding: false
 DerivePointerAlignment: false
-PointerAlignment: Left
 DisableFormat:   false
-ExperimentalAutoDetectBinPacking: false
 FixNamespaceComments: true
-ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+ForEachMacros:
+  - foreach
+  - Q_FOREACH
+  - BOOST_FOREACH
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
@@ -78,6 +81,7 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentExternBlock: NoIndent
 IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -92,6 +96,7 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
@@ -100,12 +105,13 @@
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
 PenaltyIndentedWhitespace: 0
+PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
 ReflowComments:  true
 RequiresClausePosition: OwnLine
 RequiresExpressionIndentation: Keyword
-SortIncludes:    true
+SortIncludes: CaseSensitive
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: true
@@ -117,7 +123,7 @@
 SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
-SpacesInAngles:  false
+SpacesInAngles: Never
 SpacesInContainerLiterals: true
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
diff --git a/src/metric.cpp b/src/metric.cpp
index 9350099..2504dbf 100644
--- a/src/metric.cpp
+++ b/src/metric.cpp
@@ -30,12 +30,12 @@
 
 void Metric::unregisterFromUpdates(interfaces::MetricListener& listener)
 {
-    listeners.erase(std::remove_if(
-                        listeners.begin(), listeners.end(),
-                        [&listener](const interfaces::MetricListener& item) {
+    listeners.erase(
+        std::remove_if(listeners.begin(), listeners.end(),
+                       [&listener](const interfaces::MetricListener& item) {
         return &item == &listener;
-                        }),
-                    listeners.end());
+    }),
+        listeners.end());
 }
 
 void Metric::initialize()
@@ -108,10 +108,9 @@
 metrics::CollectionData&
     Metric::findAssociatedData(const interfaces::Sensor& notifier)
 {
-    auto it = std::find_if(sensors.begin(), sensors.end(),
-                           [&notifier](const auto& sensor) {
-        return sensor.get() == &notifier;
-    });
+    auto it = std::find_if(
+        sensors.begin(), sensors.end(),
+        [&notifier](const auto& sensor) { return sensor.get() == &notifier; });
     auto index = std::distance(sensors.begin(), it);
     return *collectionAlgorithms.at(index);
 }
diff --git a/src/metrics/collection_function.cpp b/src/metrics/collection_function.cpp
index 7170936..21c8111 100644
--- a/src/metrics/collection_function.cpp
+++ b/src/metrics/collection_function.cpp
@@ -11,13 +11,11 @@
     double calculate(const std::vector<ReadingItem>& readings,
                      Milliseconds) const override
     {
-        return std::min_element(
-                   readings.begin(), readings.end(),
-                   [](const auto& left, const auto& right) {
+        return std::min_element(readings.begin(), readings.end(),
+                                [](const auto& left, const auto& right) {
             return std::make_tuple(!std::isfinite(left.second), left.second) <
                    std::make_tuple(!std::isfinite(right.second), right.second);
-                   })
-            ->second;
+        })->second;
     }
 
     double calculateForStartupInterval(std::vector<ReadingItem>& readings,
@@ -35,13 +33,11 @@
     double calculate(const std::vector<ReadingItem>& readings,
                      Milliseconds) const override
     {
-        return std::max_element(
-                   readings.begin(), readings.end(),
-                   [](const auto& left, const auto& right) {
+        return std::max_element(readings.begin(), readings.end(),
+                                [](const auto& left, const auto& right) {
             return std::make_tuple(std::isfinite(left.second), left.second) <
                    std::make_tuple(std::isfinite(right.second), right.second);
-                   })
-            ->second;
+        })->second;
     }
 
     double calculateForStartupInterval(std::vector<ReadingItem>& readings,
diff --git a/src/report.cpp b/src/report.cpp
index c480675..fa1da3f 100644
--- a/src/report.cpp
+++ b/src/report.cpp
@@ -45,8 +45,8 @@
 {
     readingParameters =
         toReadingParameters(utils::transform(metrics, [](const auto& metric) {
-            return metric->dumpConfiguration();
-        }));
+        return metric->dumpConfiguration();
+    }));
 
     reportActions.insert(ReportAction::logToMetricReportsCollection);
 
@@ -65,7 +65,7 @@
                 reportManager.removeReport(this);
             });
         });
-        });
+    });
 
     auto errorMessages = verify(reportingType, interval);
     state.set<ReportFlags::enabled, ReportFlags::valid>(enabledIn,
@@ -203,7 +203,7 @@
             persistency = storeConfiguration();
         }
         return 1;
-        },
+    },
         [this](const auto&) { return state.get<ReportFlags::enabled>(); });
     dbusIface->register_method(
         "SetReportingProperties",
@@ -255,7 +255,7 @@
         persistency = storeConfiguration();
 
         setReadingBuffer(reportUpdates);
-        });
+    });
     dbusIface->register_property_r<uint64_t>(
         "Interval", sdbusplus::vtable::property_::emits_change,
         [this](const auto&) { return interval.count(); });
@@ -276,7 +276,7 @@
             persistency = oldVal = false;
         }
         return 1;
-        },
+    },
         [this](const auto&) { return persistency; });
 
     dbusIface->register_property_r("Readings", readings,
@@ -294,14 +294,14 @@
                                     labeledMetricParams);
         readingParameters = toReadingParameters(
             utils::transform(metrics, [](const auto& metric) {
-                return metric->dumpConfiguration();
-            }));
+            return metric->dumpConfiguration();
+        }));
         metricCount = getMetricCount(metrics);
         setReadingBuffer(reportUpdates);
         persistency = storeConfiguration();
         oldVal = std::move(newVal);
         return 1;
-        },
+    },
         [this](const auto&) { return readingParameters; });
     dbusIface->register_property_r<bool>("EmitsReadingsUpdate",
                                          sdbusplus::vtable::property_::none,
@@ -322,8 +322,8 @@
         [this](auto newVal, auto& oldVal) {
         auto tmp = utils::transform<std::unordered_set>(
             newVal, [](const auto& reportAction) {
-                return utils::toReportAction(reportAction);
-            });
+            return utils::toReportAction(reportAction);
+        });
         tmp.insert(ReportAction::logToMetricReportsCollection);
 
         if (tmp != reportActions)
@@ -333,7 +333,7 @@
             oldVal = std::move(newVal);
         }
         return 1;
-        },
+    },
         [this](const auto&) {
         return utils::transform<std::vector>(reportActions,
                                              [](const auto reportAction) {
@@ -350,17 +350,17 @@
         setReportUpdates(utils::toReportUpdates(newVal));
         oldVal = newVal;
         return 1;
-        },
+    },
         [this](const auto&) { return utils::enumToString(reportUpdates); });
     dbusIface->register_property_r(
         "Triggers", std::vector<sdbusplus::message::object_path>{},
         sdbusplus::vtable::property_::emits_change, [this](const auto&) {
-            return utils::transform<std::vector>(triggerIds,
-                                                 [](const auto& triggerId) {
+        return utils::transform<std::vector>(triggerIds,
+                                             [](const auto& triggerId) {
             return utils::pathAppend(utils::constants::triggerDirPath,
                                      triggerId);
-            });
         });
+    });
     dbusIface->register_method("Update", [this] {
         if (reportingType == ReportingType::onRequest)
         {
@@ -502,10 +502,9 @@
         data["Interval"] = interval.count();
         data["AppendLimit"] = appendLimit;
         data["ReportUpdates"] = utils::toUnderlying(reportUpdates);
-        data["ReadingParameters"] = utils::transform(metrics,
-                                                     [](const auto& metric) {
-            return metric->dumpConfiguration();
-        });
+        data["ReadingParameters"] = utils::transform(
+            metrics,
+            [](const auto& metric) { return metric->dumpConfiguration(); });
 
         if (shouldStoreMetricValues())
         {
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 5f80355..2d7cd40 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -26,19 +26,18 @@
     std::vector<LabeledMetricParameters> labeledMetricParams, bool enabled,
     Readings readings) const
 {
-    auto metrics =
-        utils::transform(labeledMetricParams,
-                         [this](const LabeledMetricParameters& param)
-                             -> std::shared_ptr<interfaces::Metric> {
-                             namespace ts = utils::tstring;
+    auto metrics = utils::transform(labeledMetricParams,
+                                    [this](const LabeledMetricParameters& param)
+                                        -> std::shared_ptr<interfaces::Metric> {
+        namespace ts = utils::tstring;
 
-                             return std::make_shared<Metric>(
-                                 getSensors(param.at_label<ts::SensorPath>()),
-                                 param.at_label<ts::OperationType>(),
-                                 param.at_label<ts::CollectionTimeScope>(),
-                                 param.at_label<ts::CollectionDuration>(),
-                                 std::make_unique<Clock>());
-                         });
+        return std::make_shared<Metric>(
+            getSensors(param.at_label<ts::SensorPath>()),
+            param.at_label<ts::OperationType>(),
+            param.at_label<ts::CollectionTimeScope>(),
+            param.at_label<ts::CollectionDuration>(),
+            std::make_unique<Clock>());
+    });
 
     return std::make_unique<Report>(
         bus->get_io_context(), objServer, id, name, reportingType,
@@ -98,14 +97,13 @@
 {
     using namespace utils::tstring;
 
-    return utils::transform(
-        sensorPaths,
-        [this](const LabeledSensorInfo& sensorPath)
-            -> std::shared_ptr<interfaces::Sensor> {
-            return sensorCache.makeSensor<Sensor>(
-                sensorPath.at_label<Service>(), sensorPath.at_label<Path>(),
-                sensorPath.at_label<Metadata>(), bus->get_io_context(), bus);
-        });
+    return utils::transform(sensorPaths,
+                            [this](const LabeledSensorInfo& sensorPath)
+                                -> std::shared_ptr<interfaces::Sensor> {
+        return sensorCache.makeSensor<Sensor>(
+            sensorPath.at_label<Service>(), sensorPath.at_label<Path>(),
+            sensorPath.at_label<Metadata>(), bus->get_io_context(), bus);
+    });
 }
 
 std::vector<LabeledMetricParameters> ReportFactory::convertMetricParams(
diff --git a/src/report_manager.cpp b/src/report_manager.cpp
index 0dcb6d5..3af033a 100644
--- a/src/report_manager.cpp
+++ b/src/report_manager.cpp
@@ -27,8 +27,7 @@
     loadFromPersistent();
 
     reportManagerIface = objServer->add_unique_interface(
-        reportManagerPath, reportManagerIfaceName,
-        [this](auto& dbusIface) {
+        reportManagerPath, reportManagerIfaceName, [this](auto& dbusIface) {
         dbusIface.register_property_r("MaxReports", size_t{},
                                       sdbusplus::vtable::property_::const_,
                                       [](const auto&) { return maxReports; });
@@ -39,10 +38,10 @@
             "SupportedOperationTypes", std::vector<std::string>{},
             sdbusplus::vtable::property_::const_,
             [](const auto&) -> std::vector<std::string> {
-                return utils::transform<std::vector>(
-                    utils::convDataOperationType,
-                    [](const auto& item) { return std::string(item.first); });
-            });
+            return utils::transform<std::vector>(
+                utils::convDataOperationType,
+                [](const auto& item) { return std::string(item.first); });
+        });
         dbusIface.register_method(
             "AddReport",
             [this](boost::asio::yield_context& yield, std::string reportId,
@@ -72,17 +71,16 @@
 
             return addReport(yield, reportId, reportName,
                              utils::toReportingType(reportingType),
-                             utils::transform(
-                                 reportActions,
-                                 [](const auto& reportAction) {
+                             utils::transform(reportActions,
+                                              [](const auto& reportAction) {
                 return utils::toReportAction(reportAction);
-                                 }),
+            }),
                              Milliseconds(interval), appendLimit,
                              utils::toReportUpdates(reportUpdates),
                              readingParameters, enabled)
                 .getPath();
-            });
         });
+    });
 }
 
 void ReportManager::removeReport(const interfaces::Report* report)
@@ -205,7 +203,7 @@
                 data->at("ReportActions").get<std::vector<uint32_t>>(),
                 [](const auto reportAction) {
                 return utils::toReportAction(reportAction);
-                });
+            });
             uint64_t interval = data->at("Interval").get<uint64_t>();
             uint64_t appendLimit = data->at("AppendLimit").get<uint64_t>();
             uint32_t reportUpdates = data->at("ReportUpdates").get<uint32_t>();
diff --git a/src/sensor.cpp b/src/sensor.cpp
index efebc5d..048dc52 100644
--- a/src/sensor.cpp
+++ b/src/sensor.cpp
@@ -61,7 +61,7 @@
         {
             self->updateValue(newValue);
         }
-        });
+    });
 }
 
 void Sensor::registerForUpdates(
@@ -92,14 +92,13 @@
 {
     if (auto listener = weakListener.lock())
     {
-        listeners.erase(
-            std::remove_if(
-                listeners.begin(), listeners.end(),
-                [listenerToUnregister = listener.get()](const auto& listener) {
+        listeners.erase(std::remove_if(listeners.begin(), listeners.end(),
+                                       [listenerToUnregister = listener.get()](
+                                           const auto& listener) {
             return (listener.expired() ||
                     listener.lock().get() == listenerToUnregister);
-                }),
-            listeners.end());
+        }),
+                        listeners.end());
     }
 }
 
@@ -138,7 +137,7 @@
         *bus, param,
         [weakSelf = weak_from_this()](sdbusplus::message_t& message) {
         signalProc(weakSelf, message);
-        });
+    });
 }
 
 void Sensor::signalProc(const std::weak_ptr<Sensor>& weakSelf,
diff --git a/src/trigger.cpp b/src/trigger.cpp
index a167d3c..b80afa7 100644
--- a/src/trigger.cpp
+++ b/src/trigger.cpp
@@ -32,26 +32,26 @@
 {
     deleteIface = objServer->add_unique_interface(
         path, deleteIfaceName, [this, &ioc, &triggerManager](auto& dbusIface) {
-            dbusIface.register_method("Delete", [this, &ioc, &triggerManager] {
-                if (persistent)
-                {
-                    triggerStorage.remove(fileName);
-                }
-                messanger.send(messages::TriggerPresenceChangedInd{
-                    messages::Presence::Removed, *id, {}});
-                boost::asio::post(ioc, [this, &triggerManager] {
-                    triggerManager.removeTrigger(this);
-                });
+        dbusIface.register_method("Delete", [this, &ioc, &triggerManager] {
+            if (persistent)
+            {
+                triggerStorage.remove(fileName);
+            }
+            messanger.send(messages::TriggerPresenceChangedInd{
+                messages::Presence::Removed, *id, {}});
+            boost::asio::post(ioc, [this, &triggerManager] {
+                triggerManager.removeTrigger(this);
             });
         });
+    });
 
     triggerIface = objServer->add_unique_interface(
         path, triggerIfaceName, [this, &triggerFactory](auto& dbusIface) {
-            persistent = storeConfiguration();
-            dbusIface.register_property_rw(
-                "Persistent", persistent,
-                sdbusplus::vtable::property_::emits_change,
-                [this](bool newVal, const auto&) {
+        persistent = storeConfiguration();
+        dbusIface.register_property_rw(
+            "Persistent", persistent,
+            sdbusplus::vtable::property_::emits_change,
+            [this](bool newVal, const auto&) {
             if (newVal == persistent)
             {
                 return 1;
@@ -66,13 +66,13 @@
                 persistent = false;
             }
             return 1;
-                },
-                [this](const auto&) { return persistent; });
+        },
+            [this](const auto&) { return persistent; });
 
-            dbusIface.register_property_rw(
-                "Thresholds", TriggerThresholdParams{},
-                sdbusplus::vtable::property_::emits_change,
-                [this, &triggerFactory](auto newVal, auto& oldVal) {
+        dbusIface.register_property_rw(
+            "Thresholds", TriggerThresholdParams{},
+            sdbusplus::vtable::property_::emits_change,
+            [this, &triggerFactory](auto newVal, auto& oldVal) {
             auto newThresholdParams =
                 std::visit(utils::ToLabeledThresholdParamConversion(), newVal);
             TriggerManager::verifyThresholdParams(newThresholdParams);
@@ -81,15 +81,15 @@
                                             newThresholdParams);
             oldVal = std::move(newVal);
             return 1;
-                },
-                [this](const auto&) {
+        },
+            [this](const auto&) {
             return fromLabeledThresholdParam(getLabeledThresholds());
-            });
+        });
 
-            dbusIface.register_property_rw(
-                "Sensors", SensorsInfo{},
-                sdbusplus::vtable::property_::emits_change,
-                [this, &triggerFactory](auto newVal, auto& oldVal) {
+        dbusIface.register_property_rw(
+            "Sensors", SensorsInfo{},
+            sdbusplus::vtable::property_::emits_change,
+            [this, &triggerFactory](auto newVal, auto& oldVal) {
             auto labeledSensorInfo =
                 triggerFactory.getLabeledSensorsInfo(newVal);
             triggerFactory.updateSensors(sensors, labeledSensorInfo);
@@ -99,15 +99,15 @@
             }
             oldVal = std::move(newVal);
             return 1;
-                },
-                [this](const auto&) {
+        },
+            [this](const auto&) {
             return utils::fromLabeledSensorsInfo(getLabeledSensorInfo());
-            });
+        });
 
-            dbusIface.register_property_rw(
-                "Reports", std::vector<sdbusplus::message::object_path>(),
-                sdbusplus::vtable::property_::emits_change,
-                [this](auto newVal, auto& oldVal) {
+        dbusIface.register_property_rw(
+            "Reports", std::vector<sdbusplus::message::object_path>(),
+            sdbusplus::vtable::property_::emits_change,
+            [this](auto newVal, auto& oldVal) {
             auto newReportIds = utils::transform<std::vector>(
                 newVal,
                 [](const auto& path) { return utils::reportPathToId(path); });
@@ -117,39 +117,38 @@
                 messages::Presence::Exist, *id, *reportIds});
             oldVal = std::move(newVal);
             return 1;
-                },
-                [this](const auto&) {
+        },
+            [this](const auto&) {
             return utils::transform<std::vector>(*reportIds,
                                                  [](const auto& id) {
                 return utils::pathAppend(utils::constants::reportDirPath, id);
             });
-            });
+        });
 
-            dbusIface.register_property_r(
-                "Discrete", isDiscreate(), sdbusplus::vtable::property_::const_,
-                [this](const auto& x) { return isDiscreate(); });
+        dbusIface.register_property_r(
+            "Discrete", isDiscreate(), sdbusplus::vtable::property_::const_,
+            [this](const auto& x) { return isDiscreate(); });
 
-            dbusIface.register_property_rw(
-                "Name", name, sdbusplus::vtable::property_::emits_change,
-                [this](auto newVal, auto& oldVal) {
+        dbusIface.register_property_rw(
+            "Name", name, sdbusplus::vtable::property_::emits_change,
+            [this](auto newVal, auto& oldVal) {
             if (newVal.length() > utils::constants::maxIdNameLength)
             {
                 throw errors::InvalidArgument("Name", "Name is too long.");
             }
             name = oldVal = newVal;
             return 1;
-                },
-                [this](const auto&) { return name; });
+        },
+            [this](const auto&) { return name; });
 
-            dbusIface.register_property_r("TriggerActions",
-                                          std::vector<std::string>(),
-                                          sdbusplus::vtable::property_::const_,
-                                          [this](const auto&) {
+        dbusIface.register_property_r(
+            "TriggerActions", std::vector<std::string>(),
+            sdbusplus::vtable::property_::const_, [this](const auto&) {
             return utils::transform(triggerActions, [](const auto& action) {
                 return actionToString(action);
             });
-            });
         });
+    });
 
     for (const auto& threshold : thresholds)
     {
@@ -182,10 +181,9 @@
         data["Id"] = *id;
         data["Name"] = name;
         data["ThresholdParamsDiscriminator"] = labeledThresholdParams.index();
-        data["TriggerActions"] = utils::transform(triggerActions,
-                                                  [](const auto& action) {
-            return actionToString(action);
-        });
+        data["TriggerActions"] = utils::transform(
+            triggerActions,
+            [](const auto& action) { return actionToString(action); });
         data["ThresholdParams"] =
             utils::labeledThresholdParamsToJson(labeledThresholdParams);
         data["ReportIds"] = *reportIds;
diff --git a/src/trigger_factory.cpp b/src/trigger_factory.cpp
index 9ac8f49..9f91b77 100644
--- a/src/trigger_factory.cpp
+++ b/src/trigger_factory.cpp
@@ -310,10 +310,9 @@
 {
     return utils::transform(sensorsInfo, [&tree](const auto& item) {
         const auto& [sensorPath, metadata] = item;
-        auto found = std::find_if(tree.begin(), tree.end(),
-                                  [path = sensorPath](const auto& x) {
-            return x.first == path;
-        });
+        auto found = std::find_if(
+            tree.begin(), tree.end(),
+            [path = sensorPath](const auto& x) { return x.first == path; });
 
         if (tree.end() != found)
         {
diff --git a/src/trigger_manager.cpp b/src/trigger_manager.cpp
index 984b434..20dee51 100644
--- a/src/trigger_manager.cpp
+++ b/src/trigger_manager.cpp
@@ -21,9 +21,8 @@
 {
     loadFromPersistent();
 
-    managerIface = objServer->add_unique_interface(triggerManagerPath,
-                                                   triggerManagerIfaceName,
-                                                   [this](auto& iface) {
+    managerIface = objServer->add_unique_interface(
+        triggerManagerPath, triggerManagerIfaceName, [this](auto& iface) {
         iface.register_method(
             "AddTrigger",
             [this](boost::asio::yield_context& yield, const std::string& id,
@@ -46,7 +45,7 @@
             return addTrigger(id, name, triggerActions, labeledSensorsInfo,
                               reportIds, labeledTriggerThresholdParams)
                 .getPath();
-            });
+        });
     });
 }
 
diff --git a/src/types/readings.cpp b/src/types/readings.cpp
index 5782158..47d86fc 100644
--- a/src/types/readings.cpp
+++ b/src/types/readings.cpp
@@ -9,11 +9,11 @@
 
 LabeledReadings toLabeledReadings(const Readings& readings)
 {
-    return LabeledReadings{std::get<0>(readings),
-                           utils::transform(std::get<1>(readings),
-                                            [](const auto& readingData) {
+    return LabeledReadings{
+        std::get<0>(readings),
+        utils::transform(std::get<1>(readings), [](const auto& readingData) {
         return LabeledReadingData{readingData};
-                           })};
+    })};
 }
 
 Readings toReadings(const LabeledReadings& labeledReadings)
@@ -22,7 +22,7 @@
                     utils::transform(labeledReadings.at_label<ts::Readings>(),
                                      [](const auto& labeledReadingData) {
         return labeledReadingData.to_tuple();
-                    })};
+    })};
 }
 
 } // namespace utils
diff --git a/src/types/report_types.cpp b/src/types/report_types.cpp
index 8e31ae6..bba0e6b 100644
--- a/src/types/report_types.cpp
+++ b/src/types/report_types.cpp
@@ -10,13 +10,12 @@
     return utils::transform(labeled,
                             [](const LabeledMetricParameters& metricParams) {
         return ReadingParameters::value_type(
-            utils::transform(
-                metricParams.at_label<ts::SensorPath>(),
-                [](const LabeledSensorInfo& sensorParameters) {
+            utils::transform(metricParams.at_label<ts::SensorPath>(),
+                             [](const LabeledSensorInfo& sensorParameters) {
             return std::tuple<sdbusplus::message::object_path, std::string>(
                 sensorParameters.at_label<ts::Path>(),
                 sensorParameters.at_label<ts::Metadata>());
-                }),
+        }),
             utils::enumToString(metricParams.at_label<ts::OperationType>()),
             utils::enumToString(
                 metricParams.at_label<ts::CollectionTimeScope>()),
diff --git a/src/utils/conversion.hpp b/src/utils/conversion.hpp
index f528044..e92249a 100644
--- a/src/utils/conversion.hpp
+++ b/src/utils/conversion.hpp
@@ -90,10 +90,9 @@
 inline T toEnum(const std::array<std::pair<std::string_view, T>, N>& data,
                 const std::string& value)
 {
-    auto it = std::find_if(std::begin(data), std::end(data),
-                           [&value](const auto& item) {
-        return item.first == value;
-    });
+    auto it = std::find_if(
+        std::begin(data), std::end(data),
+        [&value](const auto& item) { return item.first == value; });
     if (it == std::end(data))
     {
         throwConversionError(EnumTraits<T>::propertyName);
@@ -106,10 +105,9 @@
     enumToString(const std::array<std::pair<std::string_view, T>, N>& data,
                  T value)
 {
-    auto it = std::find_if(std::begin(data), std::end(data),
-                           [value](const auto& item) {
-        return item.second == value;
-    });
+    auto it = std::find_if(
+        std::begin(data), std::end(data),
+        [value](const auto& item) { return item.second == value; });
     if (it == std::end(data))
     {
         throwConversionError(EnumTraits<T>::propertyName);
diff --git a/src/utils/conversion_trigger.cpp b/src/utils/conversion_trigger.cpp
index 98ae2a5..d577f76 100644
--- a/src/utils/conversion_trigger.cpp
+++ b/src/utils/conversion_trigger.cpp
@@ -44,29 +44,27 @@
     const std::vector<numeric::LabeledThresholdParam>& arg) const
 {
     return utils::transform(
-        arg,
-        [](const numeric::LabeledThresholdParam& labeledThresholdParam) {
+        arg, [](const numeric::LabeledThresholdParam& labeledThresholdParam) {
         return numeric::ThresholdParam(
             numeric::typeToString(labeledThresholdParam.at_label<ts::Type>()),
             labeledThresholdParam.at_label<ts::DwellTime>(),
             numeric::directionToString(
                 labeledThresholdParam.at_label<ts::Direction>()),
             labeledThresholdParam.at_label<ts::ThresholdValue>());
-        });
+    });
 }
 
 TriggerThresholdParams FromLabeledThresholdParamConversion::operator()(
     const std::vector<discrete::LabeledThresholdParam>& arg) const
 {
     return utils::transform(
-        arg,
-        [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
+        arg, [](const discrete::LabeledThresholdParam& labeledThresholdParam) {
         return discrete::ThresholdParam(
             labeledThresholdParam.at_label<ts::UserId>(),
             utils::enumToString(labeledThresholdParam.at_label<ts::Severity>()),
             labeledThresholdParam.at_label<ts::DwellTime>(),
             labeledThresholdParam.at_label<ts::ThresholdValue>());
-        });
+    });
 }
 
 SensorsInfo fromLabeledSensorsInfo(const std::vector<LabeledSensorInfo>& infos)
diff --git a/src/utils/labeled_tuple.hpp b/src/utils/labeled_tuple.hpp
index b320c3b..c519dd4 100644
--- a/src/utils/labeled_tuple.hpp
+++ b/src/utils/labeled_tuple.hpp
@@ -210,7 +210,7 @@
             return std::apply(
                 [&](auto&&... y) { return (true && ... && detail::eq(x, y)); },
                 value);
-            },
+        },
             other.value);
     }
 
diff --git a/src/utils/make_id_name.cpp b/src/utils/make_id_name.cpp
index 1148622..0f78ab6 100644
--- a/src/utils/make_id_name.cpp
+++ b/src/utils/make_id_name.cpp
@@ -49,12 +49,11 @@
     {
         strippedId = defaultName;
     }
-    strippedId.erase(std::remove_if(
-                         strippedId.begin(), strippedId.end(),
-                         [](char c) {
+    strippedId.erase(std::remove_if(strippedId.begin(), strippedId.end(),
+                                    [](char c) {
         return c == '/' || utils::constants::allowedCharactersInPath.find(c) ==
                                std::string_view::npos;
-                         }),
+    }),
                      strippedId.end());
 
     size_t idx = 0;
diff --git a/src/utils/messanger_service.cpp b/src/utils/messanger_service.cpp
index 25f154c..56c38f6 100644
--- a/src/utils/messanger_service.cpp
+++ b/src/utils/messanger_service.cpp
@@ -16,11 +16,11 @@
 
 void MessangerService::destroy(MessangerService::Context& context)
 {
-    contexts_.erase(
-        std::remove_if(
-            contexts_.begin(), contexts_.end(),
-            [&context](const auto& item) { return item.get() == &context; }),
-        contexts_.end());
+    contexts_.erase(std::remove_if(contexts_.begin(), contexts_.end(),
+                                   [&context](const auto& item) {
+        return item.get() == &context;
+    }),
+                    contexts_.end());
 }
 
 boost::asio::execution_context::id MessangerService::id = {};
diff --git a/src/utils/threshold_operations.hpp b/src/utils/threshold_operations.hpp
index 42d469e..99ae4a5 100644
--- a/src/utils/threshold_operations.hpp
+++ b/src/utils/threshold_operations.hpp
@@ -22,11 +22,10 @@
         getDetails(ThresholdType* thresholdPtr,
                    const interfaces::Sensor& sensor)
     {
-        auto it = std::find_if(thresholdPtr->sensorDetails.begin(),
-                               thresholdPtr->sensorDetails.end(),
-                               [&sensor](const auto& x) {
-            return &sensor == x.first.get();
-        });
+        auto it = std::find_if(
+            thresholdPtr->sensorDetails.begin(),
+            thresholdPtr->sensorDetails.end(),
+            [&sensor](const auto& x) { return &sensor == x.first.get(); });
         return *it->second;
     }
 
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()},