clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I4899e7d199e51b1fa830be13c4e1a629f86edc09
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index 28e3328..e5530e6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -17,9 +17,7 @@
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: None
@@ -43,12 +41,14 @@
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
+BreakAfterReturnType: Automatic
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
+BreakTemplateDeclarations: Yes
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
@@ -104,7 +104,7 @@
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyReturnTypeOnItsOwnLine: 150
PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index e64d52e..19cd1c2 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -221,9 +221,9 @@
"REDFISH_MESSAGE_ARGS=%s", errorStr.c_str(), NULL);
}
-static void
- handleLastCountChange(std::shared_ptr<sdbusplus::asio::connection> conn,
- std::string eventName, uint8_t currentCount)
+static void handleLastCountChange(
+ std::shared_ptr<sdbusplus::asio::connection> conn, std::string eventName,
+ uint8_t currentCount)
{
sdbusplus::asio::setProperty(
*conn, "xyz.openbmc_project.Settings",
@@ -241,8 +241,8 @@
return;
}
-static void
- checkAndLogEvents(std::shared_ptr<sdbusplus::asio::connection>& conn)
+static void checkAndLogEvents(
+ std::shared_ptr<sdbusplus::asio::connection>& conn)
{
sdbusplus::asio::getAllProperties(
*conn, "xyz.openbmc_project.Settings",