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: Ic2c9732543fc02a10df820078faa767638b179b5
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/src/callback.hpp b/src/callback.hpp
index 49d16a2..7825faf 100644
--- a/src/callback.hpp
+++ b/src/callback.hpp
@@ -242,7 +242,7 @@
                 // The timer uses the context saved on timer enable
                 this->ConditionalCallback<CallbackAccess>::operator()(
                     this->ctx);
-                });
+            });
             // **INDENT-ON**
         }
 
diff --git a/src/count.hpp b/src/count.hpp
index efc00fe..3dad8e7 100644
--- a/src/count.hpp
+++ b/src/count.hpp
@@ -58,7 +58,7 @@
         auto count = std::count_if(index.cbegin(), index.cend(),
                                    [this](const auto& item)
                                    // *INDENT-OFF*
-                                   {
+        {
             // Get the property value from storage[0],
             // and save the op result in storage[1].
             const auto& storage = std::get<storageIndex>(item.second);
diff --git a/src/pathwatchimpl.hpp b/src/pathwatchimpl.hpp
index 282ed60..f2ac946 100644
--- a/src/pathwatchimpl.hpp
+++ b/src/pathwatchimpl.hpp
@@ -33,7 +33,7 @@
         sdbusplus::bus::match::rules::interfacesAdded(objectPath),
         [this](auto& msg)
         // *INDENT-OFF*
-        { (this->cb)(Context::SIGNAL, msg); });
+    { (this->cb)(Context::SIGNAL, msg); });
     // *INDENT-ON*
 
     alreadyRan = true;
diff --git a/src/propertywatchimpl.hpp b/src/propertywatchimpl.hpp
index 8861793..9c009fe 100644
--- a/src/propertywatchimpl.hpp
+++ b/src/propertywatchimpl.hpp
@@ -45,7 +45,7 @@
             sdbusplus::bus::match::rules::interfacesAdded(path),
             [this](auto& msg)
             // *INDENT-OFF*
-            { this->interfacesAdded(msg); });
+        { this->interfacesAdded(msg); });
         // *INDENT-ON*
 
         // Do a query to populate the cache.  Start with a mapper query.
@@ -77,12 +77,12 @@
                                                                 interface),
                 [this](auto& msg)
                 // *INDENT-OFF*
-                {
+            {
                 std::string interface;
                 msg.read(interface);
                 auto path = msg.get_path();
                 this->propertiesChanged(msg, path, interface);
-                });
+            });
             // *INDENT-ON*
 
             // The mapper response is a busname:[interfaces] map.  Look for