clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I46c47707399c23ec5c84c8e654d6e912cd340f66
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/bifurcation/bifurcation.hpp b/bifurcation/bifurcation.hpp
index c0bd23d..b774aa0 100644
--- a/bifurcation/bifurcation.hpp
+++ b/bifurcation/bifurcation.hpp
@@ -37,8 +37,8 @@
      * @param[in] bus    - I2C bus of the device
      * @return the bifurcation at the i2c bus
      */
-    virtual std::optional<std::vector<uint8_t>>
-        getBifurcation(uint8_t bus) noexcept = 0;
+    virtual std::optional<std::vector<uint8_t>> getBifurcation(
+        uint8_t bus) noexcept = 0;
 };
 
 class BifurcationStatic : public BifurcationInterface
@@ -53,8 +53,8 @@
 
     BifurcationStatic(std::string_view bifurcationFile);
 
-    std::optional<std::vector<uint8_t>>
-        getBifurcation(uint8_t index) noexcept override;
+    std::optional<std::vector<uint8_t>> getBifurcation(
+        uint8_t index) noexcept override;
 
   protected:
     BifurcationStatic();
diff --git a/bifurcation/bifurcation_static.cpp b/bifurcation/bifurcation_static.cpp
index 75e94dd..278a06f 100644
--- a/bifurcation/bifurcation_static.cpp
+++ b/bifurcation/bifurcation_static.cpp
@@ -38,8 +38,8 @@
     bifurcationFile(bifurcationFile)
 {}
 
-std::optional<std::vector<uint8_t>>
-    BifurcationStatic::getBifurcation(uint8_t index) noexcept
+std::optional<std::vector<uint8_t>> BifurcationStatic::getBifurcation(
+    uint8_t index) noexcept
 {
     // Example valid data:
     // {
diff --git a/handler.cpp b/handler.cpp
index 9d57d83..18c74a1 100644
--- a/handler.cpp
+++ b/handler.cpp
@@ -126,8 +126,8 @@
     return isBmcInBareMetalMode(this->getFs());
 }
 
-std::tuple<std::uint8_t, std::string>
-    Handler::getEthDetails(std::string intf) const
+std::tuple<std::uint8_t, std::string> Handler::getEthDetails(
+    std::string intf) const
 {
     if (intf.empty())
     {
@@ -447,8 +447,8 @@
     return _pcie_i2c_map.size();
 }
 
-std::tuple<std::uint32_t, std::string>
-    Handler::getI2cEntry(unsigned int entry) const
+std::tuple<std::uint32_t, std::string> Handler::getI2cEntry(
+    unsigned int entry) const
 {
     return _pcie_i2c_map[entry];
 }
diff --git a/handler.hpp b/handler.hpp
index 50bfb02..ea515ed 100644
--- a/handler.hpp
+++ b/handler.hpp
@@ -52,8 +52,8 @@
      *
      * @return tuple of ethernet details (channel, if name).
      */
-    virtual std::tuple<std::uint8_t, std::string>
-        getEthDetails(std::string intf) const = 0;
+    virtual std::tuple<std::uint8_t, std::string> getEthDetails(
+        std::string intf) const = 0;
 
     /**
      * Return the value of rx_packets, given a if_name.
@@ -136,8 +136,8 @@
      * @param[in] entry - the index into the vector.
      * @return the tuple at that index.
      */
-    virtual std::tuple<std::uint32_t, std::string>
-        getI2cEntry(unsigned int entry) const = 0;
+    virtual std::tuple<std::uint32_t, std::string> getI2cEntry(
+        unsigned int entry) const = 0;
 
     /**
      * Set the Host Power Off delay.
diff --git a/handler_impl.hpp b/handler_impl.hpp
index 8636d3c..d671cc2 100644
--- a/handler_impl.hpp
+++ b/handler_impl.hpp
@@ -51,8 +51,8 @@
     ~Handler() = default;
 
     uint8_t getBmcMode() override;
-    std::tuple<std::uint8_t, std::string>
-        getEthDetails(std::string intf) const override;
+    std::tuple<std::uint8_t, std::string> getEthDetails(
+        std::string intf) const override;
     std::int64_t getRxPackets(const std::string& name) const override;
     VersionTuple getCpldVersion(unsigned int id) const override;
     void psuResetDelay(std::uint32_t delay) const override;
@@ -63,8 +63,8 @@
     void buildI2cPcieMapping() override;
     size_t getI2cPcieMappingSize() const override;
     void hostPowerOffDelay(std::uint32_t delay) const override;
-    std::tuple<std::uint32_t, std::string>
-        getI2cEntry(unsigned int entry) const override;
+    std::tuple<std::uint32_t, std::string> getI2cEntry(
+        unsigned int entry) const override;
     std::vector<uint8_t> pcieBifurcation(uint8_t) override;
 
     uint32_t accelOobDeviceCount() const override;
diff --git a/test/helper.hpp b/test/helper.hpp
index f0a10e8..4eb0a89 100644
--- a/test/helper.hpp
+++ b/test/helper.hpp
@@ -30,9 +30,9 @@
 
 // Validate the return code and the data for the IPMI reply.
 // Returns the subcommand and the optional information.
-std::pair<std::uint8_t, std::vector<std::uint8_t>>
-    ValidateReply(::ipmi::RspType<std::uint8_t, std::vector<uint8_t>> reply,
-                  bool hasData = true);
+std::pair<std::uint8_t, std::vector<std::uint8_t>> ValidateReply(
+    ::ipmi::RspType<std::uint8_t, std::vector<uint8_t>> reply,
+    bool hasData = true);
 
 } // namespace ipmi
 } // namespace google