clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I9230bbf1838e1e34ee6b6b49553a59fc9245cca1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index a75a2c2..e5530e6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -104,7 +104,7 @@
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyReturnTypeOnItsOwnLine: 150
PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
diff --git a/src/activation.hpp b/src/activation.hpp
index 5cf040a..34acfe8 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -43,11 +43,11 @@
public:
ActivationBlocksTransition() = delete;
ActivationBlocksTransition(const ActivationBlocksTransition&) = delete;
- ActivationBlocksTransition&
- operator=(const ActivationBlocksTransition&) = delete;
+ ActivationBlocksTransition& operator=(const ActivationBlocksTransition&) =
+ delete;
ActivationBlocksTransition(ActivationBlocksTransition&&) = delete;
- ActivationBlocksTransition&
- operator=(ActivationBlocksTransition&&) = delete;
+ ActivationBlocksTransition& operator=(ActivationBlocksTransition&&) =
+ delete;
/** @brief Constructs ActivationBlocksTransition.
*
@@ -169,8 +169,8 @@
*
* @return Success or exception thrown
*/
- RequestedActivations
- requestedActivation(RequestedActivations value) override;
+ RequestedActivations requestedActivation(
+ RequestedActivations value) override;
/** @brief Overloaded ExtendedVersion property setter function
*
diff --git a/src/item_updater.cpp b/src/item_updater.cpp
index 8d39162..a77d2e4 100644
--- a/src/item_updater.cpp
+++ b/src/item_updater.cpp
@@ -666,8 +666,8 @@
}
}
-void
- ItemUpdater::invokeActivation(const std::unique_ptr<Activation>& activation)
+void ItemUpdater::invokeActivation(
+ const std::unique_ptr<Activation>& activation)
{
activation->requestedActivation(Activation::RequestedActivations::Active);
}
diff --git a/src/utils.cpp b/src/utils.cpp
index 27b6eea..369fb2d 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -85,8 +85,8 @@
return utils;
}
-std::vector<std::string>
- Utils::getPSUInventoryPaths(sdbusplus::bus_t& bus) const
+std::vector<std::string> Utils::getPSUInventoryPaths(
+ sdbusplus::bus_t& bus) const
{
std::vector<std::string> paths;
try
diff --git a/src/utils.hpp b/src/utils.hpp
index 2ce64f4..4b2d718 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -143,15 +143,15 @@
virtual ~UtilsInterface() = default;
- virtual std::vector<std::string>
- getPSUInventoryPaths(sdbusplus::bus_t& bus) const = 0;
+ virtual std::vector<std::string> getPSUInventoryPaths(
+ sdbusplus::bus_t& bus) const = 0;
virtual std::string getService(sdbusplus::bus_t& bus, const char* path,
const char* interface) const = 0;
- virtual std::vector<std::string>
- getServices(sdbusplus::bus_t& bus, const char* path,
- const char* interface) const = 0;
+ virtual std::vector<std::string> getServices(
+ sdbusplus::bus_t& bus, const char* path,
+ const char* interface) const = 0;
virtual std::string getVersionId(const std::string& version) const = 0;
@@ -159,8 +159,8 @@
virtual std::string getModel(const std::string& inventoryPath) const = 0;
- virtual std::string
- getLatestVersion(const std::set<std::string>& versions) const = 0;
+ virtual std::string getLatestVersion(
+ const std::set<std::string>& versions) const = 0;
virtual bool isAssociated(const std::string& psuInventoryPath,
const AssociationList& assocs) const = 0;
@@ -183,8 +183,8 @@
class Utils : public UtilsInterface
{
public:
- std::vector<std::string>
- getPSUInventoryPaths(sdbusplus::bus_t& bus) const override;
+ std::vector<std::string> getPSUInventoryPaths(
+ sdbusplus::bus_t& bus) const override;
std::string getService(sdbusplus::bus_t& bus, const char* path,
const char* interface) const override;
@@ -199,8 +199,8 @@
std::string getModel(const std::string& inventoryPath) const override;
- std::string
- getLatestVersion(const std::set<std::string>& versions) const override;
+ std::string getLatestVersion(
+ const std::set<std::string>& versions) const override;
bool isAssociated(const std::string& psuInventoryPath,
const AssociationList& assocs) const override;
@@ -216,8 +216,8 @@
return getUtils().getService(bus, path, interface);
}
-inline std::vector<std::string>
- getServices(sdbusplus::bus_t& bus, const char* path, const char* interface)
+inline std::vector<std::string> getServices(
+ sdbusplus::bus_t& bus, const char* path, const char* interface)
{
return getUtils().getServices(bus, path, interface);
}
diff --git a/src/version.cpp b/src/version.cpp
index 74664d8..628622c 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -72,8 +72,8 @@
return ret;
}
-std::map<std::string, std::string>
- Version::getExtVersionInfo(const std::string& extVersion)
+std::map<std::string, std::string> Version::getExtVersionInfo(
+ const std::string& extVersion)
{
// The extVersion shall be key/value pairs separated by comma,
// e.g. key1=value1,key2=value2
diff --git a/src/version.hpp b/src/version.hpp
index 2b0af13..ed016e2 100644
--- a/src/version.hpp
+++ b/src/version.hpp
@@ -129,8 +129,8 @@
*
* @return The map of key/value pairs
*/
- static std::map<std::string, std::string>
- getExtVersionInfo(const std::string& extVersion);
+ static std::map<std::string, std::string> getExtVersionInfo(
+ const std::string& extVersion);
/** @brief The temUpdater's erase callback. */
eraseFunc eraseCallback;
diff --git a/test/mocked_activation_listener.hpp b/test/mocked_activation_listener.hpp
index 092ab86..ae9901e 100644
--- a/test/mocked_activation_listener.hpp
+++ b/test/mocked_activation_listener.hpp
@@ -9,8 +9,8 @@
public:
MockedActivationListener() = default;
MockedActivationListener(const MockedActivationListener&) = delete;
- MockedActivationListener&
- operator=(const MockedActivationListener&) = delete;
+ MockedActivationListener& operator=(const MockedActivationListener&) =
+ delete;
MockedActivationListener(MockedActivationListener&&) = delete;
MockedActivationListener& operator=(MockedActivationListener&&) = delete;
diff --git a/test/mocked_association_interface.hpp b/test/mocked_association_interface.hpp
index 70e6d01..21c6bfc 100644
--- a/test/mocked_association_interface.hpp
+++ b/test/mocked_association_interface.hpp
@@ -9,11 +9,11 @@
public:
MockedAssociationInterface() = default;
MockedAssociationInterface(const MockedAssociationInterface&) = delete;
- MockedAssociationInterface&
- operator=(const MockedAssociationInterface&) = delete;
+ MockedAssociationInterface& operator=(const MockedAssociationInterface&) =
+ delete;
MockedAssociationInterface(MockedAssociationInterface&&) = delete;
- MockedAssociationInterface&
- operator=(MockedAssociationInterface&&) = delete;
+ MockedAssociationInterface& operator=(MockedAssociationInterface&&) =
+ delete;
~MockedAssociationInterface() override = default;