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: I1367c2eabf95f27b5acb08b9e6fd6eedcb77377f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index d92a3f1..d43e884 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,26 +14,30 @@
 AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: Empty
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: true
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
 AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
+BitFieldColonSpacing: None
 BraceWrapping:
   AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
+  AfterExternBlock: true
   AfterFunction:   true
   AfterNamespace:  true
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
-  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
+  BeforeLambdaBody: false
+  BeforeWhile:     false
   IndentBraces:    false
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
@@ -48,17 +52,16 @@
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DeriveLineEnding: false
 DerivePointerAlignment: false
-PointerAlignment: Left
 DisableFormat:   false
-ExperimentalAutoDetectBinPacking: false
 FixNamespaceComments: true
-ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+ForEachMacros:
+  - foreach
+  - Q_FOREACH
+  - BOOST_FOREACH
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
@@ -78,6 +81,7 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentExternBlock: NoIndent
 IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -92,6 +96,7 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
@@ -100,12 +105,13 @@
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
 PenaltyIndentedWhitespace: 0
+PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
 ReflowComments:  true
 RequiresClausePosition: OwnLine
 RequiresExpressionIndentation: Keyword
-SortIncludes:    true
+SortIncludes: CaseSensitive
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: true
@@ -117,7 +123,7 @@
 SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
-SpacesInAngles:  false
+SpacesInAngles: Never
 SpacesInContainerLiterals: true
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
diff --git a/include/biosxml.hpp b/include/biosxml.hpp
index 68e6f67..d2a584d 100644
--- a/include/biosxml.hpp
+++ b/include/biosxml.hpp
@@ -177,8 +177,8 @@
     {
         return !s.empty() &&
                std::find_if(s.begin(), s.end(), [](unsigned char c) {
-                   return !std::isdigit(c);
-               }) == s.end();
+            return !std::isdigit(c);
+        }) == s.end();
     }
 
     /* Returns 'true' if the argument string is hex representation of a number.
diff --git a/src/allowlist-filter.cpp b/src/allowlist-filter.cpp
index 844bf56..64f9cf5 100644
--- a/src/allowlist-filter.cpp
+++ b/src/allowlist-filter.cpp
@@ -276,7 +276,7 @@
         coreBIOSDone = std::get<bool>(v);
         log<level::INFO>("Read CoreBiosDone",
                          entry("VALUE=%d", static_cast<int>(coreBIOSDone)));
-        },
+    },
         coreBiosDoneService, coreBiosDonePath,
         "org.freedesktop.DBus.Properties", "Get", hostMiscIntf, "CoreBiosDone");
 }
@@ -293,7 +293,7 @@
             std::find_if(propertyList.begin(), propertyList.end(),
                          [](const std::pair<std::string, ipmi::Value>& prop) {
             return prop.first == "CoreBiosDone";
-            });
+        });
 
         if (it != propertyList.end())
         {
@@ -397,7 +397,7 @@
                                              std::get<1>(value),
                                              std::get<2>(first))
                    : first < value;
-        });
+    });
 
     // no special handling for non-system-interface channels
     if (!(request->ctx->channel == ipmi::channelSystemIface ||
diff --git a/src/appcommands.cpp b/src/appcommands.cpp
index 8f00e54..ab032c7 100644
--- a/src/appcommands.cpp
+++ b/src/appcommands.cpp
@@ -109,7 +109,7 @@
                     "BMC device state updated");
             }
         }
-        });
+    });
 
     return 0;
 }
diff --git a/src/biosconfigcommands.cpp b/src/biosconfigcommands.cpp
index 92b1f41..16621e7 100644
--- a/src/biosconfigcommands.cpp
+++ b/src/biosconfigcommands.cpp
@@ -417,7 +417,7 @@
 
                 phosphor::logging::log<phosphor::logging::level::INFO>(
                     "sendAllAttributes: send all attributes - done");
-                },
+            },
                 service, biosConfigBaseMgrPath,
                 "org.freedesktop.DBus.Properties", "Set", biosConfigIntf,
                 "BaseBIOSTable",
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index 7e8f82f..9bde818 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -403,7 +403,7 @@
                     fwUpdateState = fwStateUpdateSuccess;
                 }
             }
-            });
+        });
     }
     uint8_t activationTimerTimeout()
     {
@@ -471,7 +471,7 @@
                     "async_method_call error: activateImage failed");
                 return;
             }
-            },
+        },
             "xyz.openbmc_project.Software.BMC.Updater", objPath,
             "org.freedesktop.DBus.Properties", "Set",
             "xyz.openbmc_project.Software.Activation", "RequestedActivation",
diff --git a/src/sensorcommands.cpp b/src/sensorcommands.cpp
index 95bb491..26b289b 100644
--- a/src/sensorcommands.cpp
+++ b/src/sensorcommands.cpp
@@ -97,7 +97,7 @@
     sdrLastAdd = std::chrono::duration_cast<std::chrono::seconds>(
                      std::chrono::system_clock::now().time_since_epoch())
                      .count();
-    });
+});
 
 static sdbusplus::bus::match_t sensorRemoved(
     *getSdBus(),
@@ -108,7 +108,7 @@
     sdrLastRemove = std::chrono::duration_cast<std::chrono::seconds>(
                         std::chrono::system_clock::now().time_since_epoch())
                         .count();
-    });
+});
 
 // this keeps track of deassertions for sensor event status command. A
 // deasertion can only happen if an assertion was seen first.
@@ -156,7 +156,7 @@
             }
         }
     }
-    });
+});
 
 static void getSensorMaxMin(const SensorMap& sensorMap, double& max,
                             double& min)
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index c58f82f..21aabdb 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -730,7 +730,7 @@
         }
 
         return true;
-        });
+    });
 
     if (entity == entities.end())
     {