clang-format: copy latest and re-format

clang-format-16 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: Ica4e7ec03b12307de07581f50e03afefd0054d0f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index 52ac0a1..d92a3f1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,12 +6,14 @@
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlines: Right
-AlignOperands:   true
-AlignTrailingComments: true
+AlignOperands:  Align
+AlignTrailingComments:
+  Kind: Always
+  OverEmptyLines: 1
 AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: None
+AllowShortFunctionsOnASingleLine: Empty
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
@@ -36,12 +38,13 @@
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
   SplitEmptyNamespace:  false
+BreakAfterAttributes: Never
 BreakBeforeBinaryOperators: None
 BreakBeforeBraces: Custom
 BreakBeforeTernaryOperators: true
 BreakConstructorInitializers: AfterColon
 BreakInheritanceList: AfterColon
-BreakStringLiterals: true
+BreakStringLiterals: false
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
@@ -49,6 +52,7 @@
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
+DeriveLineEnding: false
 DerivePointerAlignment: false
 PointerAlignment: Left
 DisableFormat:   false
@@ -74,9 +78,13 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+InsertNewlineAtEOF: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+LambdaBodyIndentation: OuterScope
+LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
 MaxEmptyLinesToKeep: 1
@@ -84,13 +92,19 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyIndentedWhitespace: 0
+QualifierAlignment: Left
+ReferenceAlignment: Left
 ReflowComments:  true
+RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: Keyword
 SortIncludes:    true
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
diff --git a/watchdog/ffdc_file.cpp b/watchdog/ffdc_file.cpp
index 4fe5875..0086e2f 100644
--- a/watchdog/ffdc_file.cpp
+++ b/watchdog/ffdc_file.cpp
@@ -1,7 +1,7 @@
 #include "ffdc_file.hpp"
 
-#include <errno.h> // for errno
-#include <fcntl.h> // for open()
+#include <errno.h>     // for errno
+#include <fcntl.h>     // for open()
 #include <fmt/format.h>
 #include <string.h>    // for strerror()
 #include <sys/stat.h>  // for open()
diff --git a/watchdog/file_descriptor.hpp b/watchdog/file_descriptor.hpp
index 8416d6b..3ad55d3 100644
--- a/watchdog/file_descriptor.hpp
+++ b/watchdog/file_descriptor.hpp
@@ -30,8 +30,7 @@
      *
      * @param[in] fd - File descriptor
      */
-    explicit FileDescriptor(int fd) : fd(fd)
-    {}
+    explicit FileDescriptor(int fd) : fd(fd) {}
 
     /**
      * @brief Move constructor.
diff --git a/watchdog/utils.cpp b/watchdog/utils.cpp
index ae4a80b..a66fc8e 100644
--- a/watchdog/utils.cpp
+++ b/watchdog/utils.cpp
@@ -16,8 +16,8 @@
 TemporaryFile::TemporaryFile()
 {
     // Build template path required by mkstemp()
-    std::string templatePath =
-        fs::temp_directory_path() / "openpower-debug-collector-XXXXXX";
+    std::string templatePath = fs::temp_directory_path() /
+                               "openpower-debug-collector-XXXXXX";
 
     // Generate unique file name, create file, and open it.  The XXXXXX
     // characters are replaced by mkstemp() to make the file name unique.
diff --git a/watchdog/watchdog_dbus.cpp b/watchdog/watchdog_dbus.cpp
index 0ff0dbb..4512ab0 100644
--- a/watchdog/watchdog_dbus.cpp
+++ b/watchdog/watchdog_dbus.cpp
@@ -54,16 +54,16 @@
             if (extended == "")
             {
                 // return the method
-                method =
-                    bus.new_method_call(service.c_str(), path.c_str(),
-                                        interface.c_str(), function.c_str());
+                method = bus.new_method_call(service.c_str(), path.c_str(),
+                                             interface.c_str(),
+                                             function.c_str());
             }
             else
             {
                 // return extended method
-                method =
-                    bus.new_method_call(service.c_str(), path.c_str(),
-                                        extended.c_str(), function.c_str());
+                method = bus.new_method_call(service.c_str(), path.c_str(),
+                                             extended.c_str(),
+                                             function.c_str());
             }
 
             rc = RC_SUCCESS;
diff --git a/watchdog/watchdog_handler.cpp b/watchdog/watchdog_handler.cpp
index a0641df..78008ac 100644
--- a/watchdog/watchdog_handler.cpp
+++ b/watchdog/watchdog_handler.cpp
@@ -85,7 +85,7 @@
             sdbusplus::bus::match::rules::propertiesChanged(
                 path.c_str(), matchInterface.c_str()),
             [&](auto& msg) {
-                return dumpStatusChanged(msg, path, progressStatus);
+        return dumpStatusChanged(msg, path, progressStatus);
             });
 
     // wait for dump status to be completed (complete == true)
diff --git a/watchdog/watchdog_logging.cpp b/watchdog/watchdog_logging.cpp
index 49c5972..50aa0aa 100644
--- a/watchdog/watchdog_logging.cpp
+++ b/watchdog/watchdog_logging.cpp
@@ -20,7 +20,6 @@
 void event(std::map<std::string, std::string>& additional,
            const uint32_t timeout)
 {
-
     std::string eventName = "org.open_power.Host.Boot.Error.WatchdogTimedOut";
 
     // CreatePELWithFFDCFiles requires a vector of FFDCTuple.