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/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())
{