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: Ifd063d23c038d986d916148051e0a261b5ba1fca
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/ibm_vpd_utils.cpp b/ibm_vpd_utils.cpp
index e0e2cdb..2378574 100644
--- a/ibm_vpd_utils.cpp
+++ b/ibm_vpd_utils.cpp
@@ -699,7 +699,7 @@
                << static_cast<int>(kwVal);
         }
         hexString = ss.str();
-        },
+    },
         kw);
     return hexString;
 }
@@ -720,7 +720,7 @@
         {
             kwString = std::string(kwVal.begin(), kwVal.end());
         }
-        },
+    },
         kwVal);
     return kwString;
 }
diff --git a/vpd-manager/bios_handler.cpp b/vpd-manager/bios_handler.cpp
index 1130cd5..f8c6d73 100644
--- a/vpd-manager/bios_handler.cpp
+++ b/vpd-manager/bios_handler.cpp
@@ -50,7 +50,7 @@
             // We don't need the match anymore
             nameOwnerMatch.reset();
         }
-            });
+    });
     // Check if PLDM is already running, if it is, we can go ahead and attempt
     // to sync BIOS attributes (since PLDM would have initialized them by the
     // time it acquires a bus name).
diff --git a/vpd-manager/manager.cpp b/vpd-manager/manager.cpp
index 50c4b90..4d0b1d7 100644
--- a/vpd-manager/manager.cpp
+++ b/vpd-manager/manager.cpp
@@ -44,41 +44,40 @@
                const std::string& recordName, const std::string& keyword,
                const Binary& value) {
         this->writeKeyword(path, recordName, keyword, value);
-        });
+    });
 
     interface->register_method(
         "GetFRUsByUnexpandedLocationCode",
         [this](const std::string& locationCode,
                const uint16_t nodeNumber) -> inventory::ListOfPaths {
-            return this->getFRUsByUnexpandedLocationCode(locationCode,
-                                                         nodeNumber);
-        });
+        return this->getFRUsByUnexpandedLocationCode(locationCode, nodeNumber);
+    });
 
     interface->register_method(
         "GetFRUsByExpandedLocationCode",
         [this](const std::string& locationCode) -> inventory::ListOfPaths {
-            return this->getFRUsByExpandedLocationCode(locationCode);
-        });
+        return this->getFRUsByExpandedLocationCode(locationCode);
+    });
 
     interface->register_method(
         "GetExpandedLocationCode",
         [this](const std::string& locationCode,
                const uint16_t nodeNumber) -> std::string {
-            return this->getExpandedLocationCode(locationCode, nodeNumber);
-        });
+        return this->getExpandedLocationCode(locationCode, nodeNumber);
+    });
 
     interface->register_method("PerformVPDRecollection",
                                [this]() { this->performVPDRecollection(); });
 
     interface->register_method(
         "deleteFRUVPD", [this](const sdbusplus::message::object_path& path) {
-            this->deleteFRUVPD(path);
-        });
+        this->deleteFRUVPD(path);
+    });
 
     interface->register_method(
         "CollectFRUVPD", [this](const sdbusplus::message::object_path& path) {
-            this->collectFRUVPD(path);
-        });
+        this->collectFRUVPD(path);
+    });
 
     sd_bus_default(&sdBus);
     initManager();
diff --git a/vpdecc/vpdecc.h b/vpdecc/vpdecc.h
index 9995192..2286abe 100644
--- a/vpdecc/vpdecc.h
+++ b/vpdecc/vpdecc.h
@@ -18,63 +18,63 @@
 {
 #endif
 
-    /* TODO  doxygen !!!!!!!! */
+/* TODO  doxygen !!!!!!!! */
 
-    /******************************************************************************/
-    /* vpdecc_create_ecc */
-    /*                                                                            */
-    /* For a given data block (together with the length of the data block */
-    /* this function creates the ECC */
-    /*                                                                            */
-    /* @param     pData           In-Buffer containing the raw VPD data */
-    /*                                            (wont't be changed) */
-    /*                                                                            */
-    /* @param     vDataLength     In        should contain the length of the
-     * Data */
-    /*                                      in the buffer given to vData */
-    /*                                                                            */
-    /* @param     pEcc            Out-Buffer after execution this will be the */
-    /*                                      buffer for the calculated Ecc */
-    /*                                                                            */
-    /* @param     pEccLenght      In/Out    In : size of buffer */
-    /*                                      Out: contains the length of the Ecc
-     */
-    /*                                                                            */
-    /* @return Error returncode */
-    /******************************************************************************/
-    int vpdecc_create_ecc(const unsigned char* data, size_t datalength,
-                          unsigned char* ecc, size_t* ecc_buffersize);
+/******************************************************************************/
+/* vpdecc_create_ecc */
+/*                                                                            */
+/* For a given data block (together with the length of the data block */
+/* this function creates the ECC */
+/*                                                                            */
+/* @param     pData           In-Buffer containing the raw VPD data */
+/*                                            (wont't be changed) */
+/*                                                                            */
+/* @param     vDataLength     In        should contain the length of the
+ * Data */
+/*                                      in the buffer given to vData */
+/*                                                                            */
+/* @param     pEcc            Out-Buffer after execution this will be the */
+/*                                      buffer for the calculated Ecc */
+/*                                                                            */
+/* @param     pEccLenght      In/Out    In : size of buffer */
+/*                                      Out: contains the length of the Ecc
+ */
+/*                                                                            */
+/* @return Error returncode */
+/******************************************************************************/
+int vpdecc_create_ecc(const unsigned char* data, size_t datalength,
+                      unsigned char* ecc, size_t* ecc_buffersize);
 
-    /******************************************************************************/
-    /* vpdecc_check_data */
-    /*                                                                            */
-    /* For a given data block (together with the ecc) */
-    /* this function checks the data for validness */
-    /*                                                                            */
-    /* @param     pData           In-Buffer containing the raw VPD data */
-    /*                            Out-Buffer containing the raw VPD data */
-    /*                                      No error           : data unchanged
-     */
-    /*                                      Correctable error  : data corrected
-     */
-    /*                                      Uncorrectable error: data unchanged
-     */
-    /*                                                                            */
-    /* @param     vDataLength     In        should contain the length of the
-     * Data */
-    /*                                      in the buffer given to vData */
-    /*                                                                            */
-    /* @param     pEcc            In-Buffer should contain the Ecc for the data
-     */
-    /*                                                                            */
-    /*                                                                            */
-    /* @param     vEccLenght      In        should contain the length of the Ecc
-     */
-    /*                                                                            */
-    /* @return Error returncode */
-    /******************************************************************************/
-    int vpdecc_check_data(unsigned char* data, size_t data_length,
-                          const unsigned char* ecc, size_t ecc_length);
+/******************************************************************************/
+/* vpdecc_check_data */
+/*                                                                            */
+/* For a given data block (together with the ecc) */
+/* this function checks the data for validness */
+/*                                                                            */
+/* @param     pData           In-Buffer containing the raw VPD data */
+/*                            Out-Buffer containing the raw VPD data */
+/*                                      No error           : data unchanged
+ */
+/*                                      Correctable error  : data corrected
+ */
+/*                                      Uncorrectable error: data unchanged
+ */
+/*                                                                            */
+/* @param     vDataLength     In        should contain the length of the
+ * Data */
+/*                                      in the buffer given to vData */
+/*                                                                            */
+/* @param     pEcc            In-Buffer should contain the Ecc for the data
+ */
+/*                                                                            */
+/*                                                                            */
+/* @param     vEccLenght      In        should contain the length of the Ecc
+ */
+/*                                                                            */
+/* @return Error returncode */
+/******************************************************************************/
+int vpdecc_check_data(unsigned char* data, size_t data_length,
+                      const unsigned char* ecc, size_t ecc_length);
 
 #ifdef __cplusplus
 } /* end extern "C" */