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: Ib4c95a1751ec33461023d1ed5c225ee3d4df940e
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/libpfr/src/pfr.cpp b/libpfr/src/pfr.cpp
index 0a07f20..d17a679 100644
--- a/libpfr/src/pfr.cpp
+++ b/libpfr/src/pfr.cpp
@@ -138,11 +138,11 @@
                 i2cBusNumber = static_cast<int>(*i2cBus);
                 i2cSlaveAddress = static_cast<int>(*address);
                 i2cConfigLoaded = true;
-                },
+            },
                 serviceName, objPath, "org.freedesktop.DBus.Properties",
                 "GetAll", "xyz.openbmc_project.Configuration.PFR");
         }
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index fc3f75a..a7f2239 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -328,7 +328,7 @@
                 }
             }
         }
-        });
+    });
 }
 
 static void monitorPlatformStateChange(
@@ -405,7 +405,7 @@
             }
             checkAndSetCheckpoint(server, conn);
         });
-        },
+    },
         "org.freedesktop.systemd1", "/org/freedesktop/systemd1",
         "org.freedesktop.DBus.Properties", "Get",
         "org.freedesktop.systemd1.Manager", "FinishTimestamp");
@@ -429,7 +429,7 @@
                 "checkpoint 9.");
             setBMCBootCompleteChkPoint(bmcBootFinishedChkPoint);
         }
-        });
+    });
     checkAndSetCheckpoint(server, conn);
 
     // Capture the Chassis state and Start the monitor timer
@@ -472,7 +472,7 @@
             // Update the D-Bus properties when chassis state changes.
             updateDbusPropertiesCache();
         }
-        });
+    });
 
     // Capture the Host state and Start the monitor timer
     // if state changed to 'Running'. Run timer until OS boot.
@@ -516,7 +516,7 @@
             // Update the D-Bus properties when host state changes.
             updateDbusPropertiesCache();
         }
-        });
+    });
 
     // Capture the OS state change and stop monitor timer
     // if OS boots completly or becomes Inactive.
@@ -561,7 +561,7 @@
                 }
             }
         }
-        });
+    });
 
     // First time, check and log events if any.
     checkAndLogEvents(conn);
@@ -580,7 +580,7 @@
                 phosphor::logging::entry("MSG=%s", ec.message().c_str()));
             return;
         }
-        },
+    },
         "xyz.openbmc_project.Settings",
         "/xyz/openbmc_project/software/rot_fw_active",
         "org.freedesktop.DBus.Properties", "Set",
diff --git a/service/src/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index e6ec29d..57e121b 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -70,7 +70,7 @@
                 }
             }
             return 0;
-            });
+        });
 
         versionIface->initialize();
     }
@@ -278,7 +278,7 @@
                 }
             }
             return 0;
-            },
+        },
             [this](uint8_t& propertyValue) {
             updatePostcode();
             propertyValue = postcode;