clang: do not break string literals
The community decided to allow string literals to go past the 80 char
limit. Update the clang file used by state-manager and change a few of
the strings to take advantage of this new setting.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I77dec79937fb71a43b10369846be47768c168856
diff --git a/.clang-format b/.clang-format
index 52ac0a1..cab3139 100644
--- a/.clang-format
+++ b/.clang-format
@@ -41,7 +41,7 @@
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
-BreakStringLiterals: true
+BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
diff --git a/host_check.cpp b/host_check.cpp
index 389c5e6..a4f8e0d 100644
--- a/host_check.cpp
+++ b/host_check.cpp
@@ -63,9 +63,9 @@
}
catch (const sdbusplus::exception::exception& e)
{
- error("Error in mapper GetSubTree call for HostFirmware condition: "
- "{ERROR}",
- "ERROR", e);
+ error(
+ "Error in mapper GetSubTree call for HostFirmware condition: {ERROR}",
+ "ERROR", e);
throw;
}
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 4611e34..8df3840 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -234,9 +234,9 @@
if (rebootCounterParam > 0)
{
// Reduce BOOTCOUNT by 1
- info("Auto reboot enabled and boot count at {BOOTCOUNT}, "
- "rebooting",
- "BOOTCOUNT", rebootCounterParam);
+ info(
+ "Auto reboot enabled and boot count at {BOOTCOUNT}, rebooting",
+ "BOOTCOUNT", rebootCounterParam);
return true;
}
else if (rebootCounterParam == 0)
@@ -248,8 +248,8 @@
}
else
{
- info("Auto reboot enabled but HOST BOOTCOUNT has an invalid "
- "value");
+ info(
+ "Auto reboot enabled but HOST BOOTCOUNT has an invalid value");
return false;
}
}
diff --git a/scheduled_host_transition.cpp b/scheduled_host_transition.cpp
index dd83f4a..6329a93 100644
--- a/scheduled_host_transition.cpp
+++ b/scheduled_host_transition.cpp
@@ -54,8 +54,8 @@
if (timer.isEnabled())
{
timer.setEnabled(false);
- debug("scheduledTime: The function Scheduled Host Transition is "
- "disabled.");
+ debug(
+ "scheduledTime: The function Scheduled Host Transition is disabled.");
}
}
else
@@ -63,8 +63,8 @@
auto deltaTime = seconds(value) - getTime();
if (deltaTime < seconds(0))
{
- error("Scheduled time is earlier than current time. Fail to "
- "schedule host transition.");
+ error(
+ "Scheduled time is earlier than current time. Fail to schedule host transition.");
elog<InvalidTimeError>(
InvalidTime::REASON("Scheduled time is in the past"));
}
@@ -181,8 +181,8 @@
if (schedTime == 0)
{
- debug("handleTimeUpdates: The function Scheduled Host Transition is "
- "disabled.");
+ debug(
+ "handleTimeUpdates: The function Scheduled Host Transition is disabled.");
return;
}
diff --git a/systemd_target_signal.cpp b/systemd_target_signal.cpp
index 79ac933..25089ef 100644
--- a/systemd_target_signal.cpp
+++ b/systemd_target_signal.cpp
@@ -53,9 +53,9 @@
targetEntry->second.errorsToMonitor.end(),
result) != targetEntry->second.errorsToMonitor.end())
{
- info("Monitored systemd unit has hit an error, unit:{UNIT}, "
- "result:{RESULT}",
- "UNIT", unit, "RESULT", result);
+ info(
+ "Monitored systemd unit has hit an error, unit:{UNIT}, result:{RESULT}",
+ "UNIT", unit, "RESULT", result);
return (&targetEntry->second.errorToLog);
}
}
diff --git a/utils.cpp b/utils.cpp
index de1ae4b..6dc7754 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -36,9 +36,9 @@
mapperResponseMsg.read(mapperResponse);
if (mapperResponse.empty())
{
- error("Error no matching service with path {PATH} and interface "
- "{INTERFACE}",
- "PATH", path, "INTERFACE", interface);
+ error(
+ "Error no matching service with path {PATH} and interface {INTERFACE}",
+ "PATH", path, "INTERFACE", interface);
throw std::runtime_error("Error no matching service");
}
}